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 // SubscriptionResponseItem subscription response item
17 // swagger:model SubscriptionResponseItem
18 type SubscriptionResponseItem struct {
22 InstanceID *int64 `json:"InstanceId"`
26 RequestorID *int64 `json:"RequestorId"`
30 SubscriptionID *string `json:"SubscriptionId"`
33 // Validate validates this subscription response item
34 func (m *SubscriptionResponseItem) Validate(formats strfmt.Registry) error {
37 if err := m.validateInstanceID(formats); err != nil {
38 res = append(res, err)
41 if err := m.validateRequestorID(formats); err != nil {
42 res = append(res, err)
45 if err := m.validateSubscriptionID(formats); err != nil {
46 res = append(res, err)
50 return errors.CompositeValidationError(res...)
55 func (m *SubscriptionResponseItem) validateInstanceID(formats strfmt.Registry) error {
57 if err := validate.Required("InstanceId", "body", m.InstanceID); err != nil {
64 func (m *SubscriptionResponseItem) validateRequestorID(formats strfmt.Registry) error {
66 if err := validate.Required("RequestorId", "body", m.RequestorID); err != nil {
73 func (m *SubscriptionResponseItem) validateSubscriptionID(formats strfmt.Registry) error {
75 if err := validate.Required("SubscriptionId", "body", m.SubscriptionID); err != nil {
82 // MarshalBinary interface implementation
83 func (m *SubscriptionResponseItem) MarshalBinary() ([]byte, error) {
87 return swag.WriteJSON(m)
90 // UnmarshalBinary interface implementation
91 func (m *SubscriptionResponseItem) UnmarshalBinary(b []byte) error {
92 var res SubscriptionResponseItem
93 if err := swag.ReadJSON(b, &res); err != nil {