github.com/goharbor/go-client@v0.210.0/pkg/sdk/v2.0/models/is_default.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 package models 4 5 // This file was generated by the swagger tool. 6 // Editing this file might prove futile when you re-run the swagger generate command 7 8 import ( 9 "context" 10 11 "github.com/go-openapi/strfmt" 12 "github.com/go-openapi/swag" 13 ) 14 15 // IsDefault is default 16 // 17 // swagger:model IsDefault 18 type IsDefault struct { 19 20 // A flag indicating whether a scanner registration is default. 21 IsDefault bool `json:"is_default,omitempty"` 22 } 23 24 // Validate validates this is default 25 func (m *IsDefault) Validate(formats strfmt.Registry) error { 26 return nil 27 } 28 29 // ContextValidate validates this is default based on context it is used 30 func (m *IsDefault) ContextValidate(ctx context.Context, formats strfmt.Registry) error { 31 return nil 32 } 33 34 // MarshalBinary interface implementation 35 func (m *IsDefault) MarshalBinary() ([]byte, error) { 36 if m == nil { 37 return nil, nil 38 } 39 return swag.WriteJSON(m) 40 } 41 42 // UnmarshalBinary interface implementation 43 func (m *IsDefault) UnmarshalBinary(b []byte) error { 44 var res IsDefault 45 if err := swag.ReadJSON(b, &res); err != nil { 46 return err 47 } 48 *m = res 49 return nil 50 }