...
1
8
9
10
11 package openapi
12
13 import (
14 "encoding/json"
15 )
16
17
18 type Graphql struct {
19 Data map[string]interface{} `json:"data,omitempty"`
20 Errors []map[string]interface{} `json:"errors,omitempty"`
21 }
22
23
24
25
26
27 func NewGraphql() *Graphql {
28 this := Graphql{}
29 return &this
30 }
31
32
33
34
35 func NewGraphqlWithDefaults() *Graphql {
36 this := Graphql{}
37 return &this
38 }
39
40
41 func (o *Graphql) GetData() map[string]interface{} {
42 if o == nil || o.Data == nil {
43 var ret map[string]interface{}
44 return ret
45 }
46 return o.Data
47 }
48
49
50
51 func (o *Graphql) GetDataOk() (map[string]interface{}, bool) {
52 if o == nil || o.Data == nil {
53 return nil, false
54 }
55 return o.Data, true
56 }
57
58
59 func (o *Graphql) HasData() bool {
60 if o != nil && o.Data != nil {
61 return true
62 }
63
64 return false
65 }
66
67
68 func (o *Graphql) SetData(v map[string]interface{}) {
69 o.Data = v
70 }
71
72
73 func (o *Graphql) GetErrors() []map[string]interface{} {
74 if o == nil || o.Errors == nil {
75 var ret []map[string]interface{}
76 return ret
77 }
78 return o.Errors
79 }
80
81
82
83 func (o *Graphql) GetErrorsOk() ([]map[string]interface{}, bool) {
84 if o == nil || o.Errors == nil {
85 return nil, false
86 }
87 return o.Errors, true
88 }
89
90
91 func (o *Graphql) HasErrors() bool {
92 if o != nil && o.Errors != nil {
93 return true
94 }
95
96 return false
97 }
98
99
100 func (o *Graphql) SetErrors(v []map[string]interface{}) {
101 o.Errors = v
102 }
103
104 func (o Graphql) MarshalJSON() ([]byte, error) {
105 toSerialize := map[string]interface{}{}
106 if o.Data != nil {
107 toSerialize["data"] = o.Data
108 }
109 if o.Errors != nil {
110 toSerialize["errors"] = o.Errors
111 }
112 return json.Marshal(toSerialize)
113 }
114
115 type NullableGraphql struct {
116 value *Graphql
117 isSet bool
118 }
119
120 func (v NullableGraphql) Get() *Graphql {
121 return v.value
122 }
123
124 func (v *NullableGraphql) Set(val *Graphql) {
125 v.value = val
126 v.isSet = true
127 }
128
129 func (v NullableGraphql) IsSet() bool {
130 return v.isSet
131 }
132
133 func (v *NullableGraphql) Unset() {
134 v.value = nil
135 v.isSet = false
136 }
137
138 func NewNullableGraphql(val *Graphql) *NullableGraphql {
139 return &NullableGraphql{value: val, isSet: true}
140 }
141
142 func (v NullableGraphql) MarshalJSON() ([]byte, error) {
143 return json.Marshal(v.value)
144 }
145
146 func (v *NullableGraphql) UnmarshalJSON(src []byte) error {
147 v.isSet = true
148 return json.Unmarshal(src, &v.value)
149 }
150
151
152
View as plain text