forked from clarkmcc/go-hubspot
/
model_gradient.go
164 lines (135 loc) · 3.59 KB
/
model_gradient.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
/*
Blog Post endpoints
Use these endpoints for interacting with Blog Posts, Blog Authors, and Blog Tags
API version: v3
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package blog_posts
import (
"encoding/json"
)
// Gradient struct for Gradient
type Gradient struct {
SideOrCorner SideOrCorner `json:"sideOrCorner"`
Angle Angle `json:"angle"`
Colors []ColorStop `json:"colors"`
}
// NewGradient instantiates a new Gradient object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewGradient(sideOrCorner SideOrCorner, angle Angle, colors []ColorStop) *Gradient {
this := Gradient{}
this.SideOrCorner = sideOrCorner
this.Angle = angle
this.Colors = colors
return &this
}
// NewGradientWithDefaults instantiates a new Gradient object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewGradientWithDefaults() *Gradient {
this := Gradient{}
return &this
}
// GetSideOrCorner returns the SideOrCorner field value
func (o *Gradient) GetSideOrCorner() SideOrCorner {
if o == nil {
var ret SideOrCorner
return ret
}
return o.SideOrCorner
}
// GetSideOrCornerOk returns a tuple with the SideOrCorner field value
// and a boolean to check if the value has been set.
func (o *Gradient) GetSideOrCornerOk() (*SideOrCorner, bool) {
if o == nil {
return nil, false
}
return &o.SideOrCorner, true
}
// SetSideOrCorner sets field value
func (o *Gradient) SetSideOrCorner(v SideOrCorner) {
o.SideOrCorner = v
}
// GetAngle returns the Angle field value
func (o *Gradient) GetAngle() Angle {
if o == nil {
var ret Angle
return ret
}
return o.Angle
}
// GetAngleOk returns a tuple with the Angle field value
// and a boolean to check if the value has been set.
func (o *Gradient) GetAngleOk() (*Angle, bool) {
if o == nil {
return nil, false
}
return &o.Angle, true
}
// SetAngle sets field value
func (o *Gradient) SetAngle(v Angle) {
o.Angle = v
}
// GetColors returns the Colors field value
func (o *Gradient) GetColors() []ColorStop {
if o == nil {
var ret []ColorStop
return ret
}
return o.Colors
}
// GetColorsOk returns a tuple with the Colors field value
// and a boolean to check if the value has been set.
func (o *Gradient) GetColorsOk() ([]ColorStop, bool) {
if o == nil {
return nil, false
}
return o.Colors, true
}
// SetColors sets field value
func (o *Gradient) SetColors(v []ColorStop) {
o.Colors = v
}
func (o Gradient) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["sideOrCorner"] = o.SideOrCorner
}
if true {
toSerialize["angle"] = o.Angle
}
if true {
toSerialize["colors"] = o.Colors
}
return json.Marshal(toSerialize)
}
type NullableGradient struct {
value *Gradient
isSet bool
}
func (v NullableGradient) Get() *Gradient {
return v.value
}
func (v *NullableGradient) Set(val *Gradient) {
v.value = val
v.isSet = true
}
func (v NullableGradient) IsSet() bool {
return v.isSet
}
func (v *NullableGradient) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGradient(val *Gradient) *NullableGradient {
return &NullableGradient{value: val, isSet: true}
}
func (v NullableGradient) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGradient) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}