New API version with additional structures and params
[ric-plt/xapp-frame.git] / pkg / clientmodel / subscription_response_item.go
1 // Code generated by go-swagger; DO NOT EDIT.
2
3 package clientmodel
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         strfmt "github.com/go-openapi/strfmt"
10
11         "github.com/go-openapi/errors"
12         "github.com/go-openapi/swag"
13         "github.com/go-openapi/validate"
14 )
15
16 // SubscriptionResponseItem subscription response item
17 // swagger:model SubscriptionResponseItem
18 type SubscriptionResponseItem struct {
19
20         // instance Id
21         // Required: true
22         InstanceID *int64 `json:"InstanceId"`
23
24         // requestor Id
25         // Required: true
26         RequestorID *int64 `json:"RequestorId"`
27
28         // subscription Id
29         // Required: true
30         SubscriptionID *string `json:"SubscriptionId"`
31 }
32
33 // Validate validates this subscription response item
34 func (m *SubscriptionResponseItem) Validate(formats strfmt.Registry) error {
35         var res []error
36
37         if err := m.validateInstanceID(formats); err != nil {
38                 res = append(res, err)
39         }
40
41         if err := m.validateRequestorID(formats); err != nil {
42                 res = append(res, err)
43         }
44
45         if err := m.validateSubscriptionID(formats); err != nil {
46                 res = append(res, err)
47         }
48
49         if len(res) > 0 {
50                 return errors.CompositeValidationError(res...)
51         }
52         return nil
53 }
54
55 func (m *SubscriptionResponseItem) validateInstanceID(formats strfmt.Registry) error {
56
57         if err := validate.Required("InstanceId", "body", m.InstanceID); err != nil {
58                 return err
59         }
60
61         return nil
62 }
63
64 func (m *SubscriptionResponseItem) validateRequestorID(formats strfmt.Registry) error {
65
66         if err := validate.Required("RequestorId", "body", m.RequestorID); err != nil {
67                 return err
68         }
69
70         return nil
71 }
72
73 func (m *SubscriptionResponseItem) validateSubscriptionID(formats strfmt.Registry) error {
74
75         if err := validate.Required("SubscriptionId", "body", m.SubscriptionID); err != nil {
76                 return err
77         }
78
79         return nil
80 }
81
82 // MarshalBinary interface implementation
83 func (m *SubscriptionResponseItem) MarshalBinary() ([]byte, error) {
84         if m == nil {
85                 return nil, nil
86         }
87         return swag.WriteJSON(m)
88 }
89
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 {
94                 return err
95         }
96         *m = res
97         return nil
98 }