// Code generated by go-swagger; DO NOT EDIT. package models // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // Address Address of the object in FrostFS. // Example: {"containerId":"5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv","objectId":"8N3o7Dtr6T1xteCt6eRwhpmJ7JhME58Hyu1dvaswuTDd"} // // swagger:model Address type Address struct { // container Id // Required: true ContainerID *string `json:"containerId"` // object Id // Required: true ObjectID *string `json:"objectId"` } // Validate validates this address func (m *Address) Validate(formats strfmt.Registry) error { var res []error if err := m.validateContainerID(formats); err != nil { res = append(res, err) } if err := m.validateObjectID(formats); err != nil { res = append(res, err) } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } func (m *Address) validateContainerID(formats strfmt.Registry) error { if err := validate.Required("containerId", "body", m.ContainerID); err != nil { return err } return nil } func (m *Address) validateObjectID(formats strfmt.Registry) error { if err := validate.Required("objectId", "body", m.ObjectID); err != nil { return err } return nil } // ContextValidate validates this address based on context it is used func (m *Address) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation func (m *Address) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } return swag.WriteJSON(m) } // UnmarshalBinary interface implementation func (m *Address) UnmarshalBinary(b []byte) error { var res Address if err := swag.ReadJSON(b, &res); err != nil { return err } *m = res return nil }