github.com/goharbor/go-client@v0.210.0/pkg/sdk/v2.0/models/internal_configuration_value.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 // InternalConfigurationValue internal configuration value 16 // 17 // swagger:model InternalConfigurationValue 18 type InternalConfigurationValue struct { 19 20 // The configure item can be updated or not 21 Editable bool `json:"editable"` 22 23 // The value of current config item 24 Value interface{} `json:"value,omitempty"` 25 } 26 27 // Validate validates this internal configuration value 28 func (m *InternalConfigurationValue) Validate(formats strfmt.Registry) error { 29 return nil 30 } 31 32 // ContextValidate validates this internal configuration value based on context it is used 33 func (m *InternalConfigurationValue) ContextValidate(ctx context.Context, formats strfmt.Registry) error { 34 return nil 35 } 36 37 // MarshalBinary interface implementation 38 func (m *InternalConfigurationValue) MarshalBinary() ([]byte, error) { 39 if m == nil { 40 return nil, nil 41 } 42 return swag.WriteJSON(m) 43 } 44 45 // UnmarshalBinary interface implementation 46 func (m *InternalConfigurationValue) UnmarshalBinary(b []byte) error { 47 var res InternalConfigurationValue 48 if err := swag.ReadJSON(b, &res); err != nil { 49 return err 50 } 51 *m = res 52 return nil 53 }