-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathmodel_basic_notification_all_of_android_background_layout.go
218 lines (176 loc) · 7.37 KB
/
model_basic_notification_all_of_android_background_layout.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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
/*
OneSignal
A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
API version: 1.2.2
Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package onesignal
import (
"encoding/json"
)
// BasicNotificationAllOfAndroidBackgroundLayout Channel: Push Notifications Platform: Android Allowing setting a background image for the notification. This is a JSON object containing the following keys. See our Background Image documentation for image sizes.
type BasicNotificationAllOfAndroidBackgroundLayout struct {
// Asset file, android resource name, or URL to remote image.
Image *string `json:"image,omitempty"`
// Title text color ARGB Hex format. Example(Blue) \"FF0000FF\".
HeadingsColor *string `json:"headings_color,omitempty"`
// Body text color ARGB Hex format. Example(Red) \"FFFF0000\".
ContentsColor *string `json:"contents_color,omitempty"`
AdditionalProperties map[string]interface{}
}
type _BasicNotificationAllOfAndroidBackgroundLayout BasicNotificationAllOfAndroidBackgroundLayout
// NewBasicNotificationAllOfAndroidBackgroundLayout instantiates a new BasicNotificationAllOfAndroidBackgroundLayout 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 NewBasicNotificationAllOfAndroidBackgroundLayout() *BasicNotificationAllOfAndroidBackgroundLayout {
this := BasicNotificationAllOfAndroidBackgroundLayout{}
return &this
}
// NewBasicNotificationAllOfAndroidBackgroundLayoutWithDefaults instantiates a new BasicNotificationAllOfAndroidBackgroundLayout 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 NewBasicNotificationAllOfAndroidBackgroundLayoutWithDefaults() *BasicNotificationAllOfAndroidBackgroundLayout {
this := BasicNotificationAllOfAndroidBackgroundLayout{}
return &this
}
// GetImage returns the Image field value if set, zero value otherwise.
func (o *BasicNotificationAllOfAndroidBackgroundLayout) GetImage() string {
if o == nil || o.Image == nil {
var ret string
return ret
}
return *o.Image
}
// GetImageOk returns a tuple with the Image field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BasicNotificationAllOfAndroidBackgroundLayout) GetImageOk() (*string, bool) {
if o == nil || o.Image == nil {
return nil, false
}
return o.Image, true
}
// HasImage returns a boolean if a field has been set.
func (o *BasicNotificationAllOfAndroidBackgroundLayout) HasImage() bool {
if o != nil && o.Image != nil {
return true
}
return false
}
// SetImage gets a reference to the given string and assigns it to the Image field.
func (o *BasicNotificationAllOfAndroidBackgroundLayout) SetImage(v string) {
o.Image = &v
}
// GetHeadingsColor returns the HeadingsColor field value if set, zero value otherwise.
func (o *BasicNotificationAllOfAndroidBackgroundLayout) GetHeadingsColor() string {
if o == nil || o.HeadingsColor == nil {
var ret string
return ret
}
return *o.HeadingsColor
}
// GetHeadingsColorOk returns a tuple with the HeadingsColor field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BasicNotificationAllOfAndroidBackgroundLayout) GetHeadingsColorOk() (*string, bool) {
if o == nil || o.HeadingsColor == nil {
return nil, false
}
return o.HeadingsColor, true
}
// HasHeadingsColor returns a boolean if a field has been set.
func (o *BasicNotificationAllOfAndroidBackgroundLayout) HasHeadingsColor() bool {
if o != nil && o.HeadingsColor != nil {
return true
}
return false
}
// SetHeadingsColor gets a reference to the given string and assigns it to the HeadingsColor field.
func (o *BasicNotificationAllOfAndroidBackgroundLayout) SetHeadingsColor(v string) {
o.HeadingsColor = &v
}
// GetContentsColor returns the ContentsColor field value if set, zero value otherwise.
func (o *BasicNotificationAllOfAndroidBackgroundLayout) GetContentsColor() string {
if o == nil || o.ContentsColor == nil {
var ret string
return ret
}
return *o.ContentsColor
}
// GetContentsColorOk returns a tuple with the ContentsColor field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BasicNotificationAllOfAndroidBackgroundLayout) GetContentsColorOk() (*string, bool) {
if o == nil || o.ContentsColor == nil {
return nil, false
}
return o.ContentsColor, true
}
// HasContentsColor returns a boolean if a field has been set.
func (o *BasicNotificationAllOfAndroidBackgroundLayout) HasContentsColor() bool {
if o != nil && o.ContentsColor != nil {
return true
}
return false
}
// SetContentsColor gets a reference to the given string and assigns it to the ContentsColor field.
func (o *BasicNotificationAllOfAndroidBackgroundLayout) SetContentsColor(v string) {
o.ContentsColor = &v
}
func (o BasicNotificationAllOfAndroidBackgroundLayout) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Image != nil {
toSerialize["image"] = o.Image
}
if o.HeadingsColor != nil {
toSerialize["headings_color"] = o.HeadingsColor
}
if o.ContentsColor != nil {
toSerialize["contents_color"] = o.ContentsColor
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return json.Marshal(toSerialize)
}
func (o *BasicNotificationAllOfAndroidBackgroundLayout) UnmarshalJSON(bytes []byte) (err error) {
varBasicNotificationAllOfAndroidBackgroundLayout := _BasicNotificationAllOfAndroidBackgroundLayout{}
if err = json.Unmarshal(bytes, &varBasicNotificationAllOfAndroidBackgroundLayout); err == nil {
*o = BasicNotificationAllOfAndroidBackgroundLayout(varBasicNotificationAllOfAndroidBackgroundLayout)
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "image")
delete(additionalProperties, "headings_color")
delete(additionalProperties, "contents_color")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableBasicNotificationAllOfAndroidBackgroundLayout struct {
value *BasicNotificationAllOfAndroidBackgroundLayout
isSet bool
}
func (v NullableBasicNotificationAllOfAndroidBackgroundLayout) Get() *BasicNotificationAllOfAndroidBackgroundLayout {
return v.value
}
func (v *NullableBasicNotificationAllOfAndroidBackgroundLayout) Set(val *BasicNotificationAllOfAndroidBackgroundLayout) {
v.value = val
v.isSet = true
}
func (v NullableBasicNotificationAllOfAndroidBackgroundLayout) IsSet() bool {
return v.isSet
}
func (v *NullableBasicNotificationAllOfAndroidBackgroundLayout) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBasicNotificationAllOfAndroidBackgroundLayout(val *BasicNotificationAllOfAndroidBackgroundLayout) *NullableBasicNotificationAllOfAndroidBackgroundLayout {
return &NullableBasicNotificationAllOfAndroidBackgroundLayout{value: val, isSet: true}
}
func (v NullableBasicNotificationAllOfAndroidBackgroundLayout) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBasicNotificationAllOfAndroidBackgroundLayout) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}