1 // Code generated by go-swagger; DO NOT EDIT.
5 // This file was generated by the swagger tool.
6 // Editing this file might prove futile when you re-run the swagger generate command
9 strfmt "github.com/go-openapi/strfmt"
11 "github.com/go-openapi/errors"
12 "github.com/go-openapi/swag"
13 "github.com/go-openapi/validate"
16 // SubscriptionInstance subscription instance
17 // swagger:model SubscriptionInstance
18 type SubscriptionInstance struct {
22 InstanceID *int64 `json:"InstanceId"`
26 RequestorID *int64 `json:"RequestorId"`
29 // Validate validates this subscription instance
30 func (m *SubscriptionInstance) Validate(formats strfmt.Registry) error {
33 if err := m.validateInstanceID(formats); err != nil {
34 res = append(res, err)
37 if err := m.validateRequestorID(formats); err != nil {
38 res = append(res, err)
42 return errors.CompositeValidationError(res...)
47 func (m *SubscriptionInstance) validateInstanceID(formats strfmt.Registry) error {
49 if err := validate.Required("InstanceId", "body", m.InstanceID); err != nil {
56 func (m *SubscriptionInstance) validateRequestorID(formats strfmt.Registry) error {
58 if err := validate.Required("RequestorId", "body", m.RequestorID); err != nil {
65 // MarshalBinary interface implementation
66 func (m *SubscriptionInstance) MarshalBinary() ([]byte, error) {
70 return swag.WriteJSON(m)
73 // UnmarshalBinary interface implementation
74 func (m *SubscriptionInstance) UnmarshalBinary(b []byte) error {
75 var res SubscriptionInstance
76 if err := swag.ReadJSON(b, &res); err != nil {