-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel_track_request.go
200 lines (164 loc) · 5.37 KB
/
model_track_request.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
/*
SendX REST API
# Introduction SendX is an email marketing product. It helps you convert website visitors to customers, send them promotional emails, engage with them using drip sequences and craft custom journeys using powerful but simple automations. The SendX API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. The SendX Rest API doesn’t support bulk updates. You can work on only one object per request. <br>
API version: 1.0.0
Contact: support@sendx.io
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sendx
import (
"encoding/json"
)
// checks if the TrackRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TrackRequest{}
// TrackRequest struct for TrackRequest
type TrackRequest struct {
// Email address of the contact to track.
Email *string `json:"email,omitempty"`
AddTags []string `json:"addTags,omitempty"`
RemoveTags []string `json:"removeTags,omitempty"`
}
// NewTrackRequest instantiates a new TrackRequest 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 NewTrackRequest() *TrackRequest {
this := TrackRequest{}
return &this
}
// NewTrackRequestWithDefaults instantiates a new TrackRequest 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 NewTrackRequestWithDefaults() *TrackRequest {
this := TrackRequest{}
return &this
}
// GetEmail returns the Email field value if set, zero value otherwise.
func (o *TrackRequest) GetEmail() string {
if o == nil || IsNil(o.Email) {
var ret string
return ret
}
return *o.Email
}
// GetEmailOk returns a tuple with the Email field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrackRequest) GetEmailOk() (*string, bool) {
if o == nil || IsNil(o.Email) {
return nil, false
}
return o.Email, true
}
// HasEmail returns a boolean if a field has been set.
func (o *TrackRequest) HasEmail() bool {
if o != nil && !IsNil(o.Email) {
return true
}
return false
}
// SetEmail gets a reference to the given string and assigns it to the Email field.
func (o *TrackRequest) SetEmail(v string) {
o.Email = &v
}
// GetAddTags returns the AddTags field value if set, zero value otherwise.
func (o *TrackRequest) GetAddTags() []string {
if o == nil || IsNil(o.AddTags) {
var ret []string
return ret
}
return o.AddTags
}
// GetAddTagsOk returns a tuple with the AddTags field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrackRequest) GetAddTagsOk() ([]string, bool) {
if o == nil || IsNil(o.AddTags) {
return nil, false
}
return o.AddTags, true
}
// HasAddTags returns a boolean if a field has been set.
func (o *TrackRequest) HasAddTags() bool {
if o != nil && !IsNil(o.AddTags) {
return true
}
return false
}
// SetAddTags gets a reference to the given []string and assigns it to the AddTags field.
func (o *TrackRequest) SetAddTags(v []string) {
o.AddTags = v
}
// GetRemoveTags returns the RemoveTags field value if set, zero value otherwise.
func (o *TrackRequest) GetRemoveTags() []string {
if o == nil || IsNil(o.RemoveTags) {
var ret []string
return ret
}
return o.RemoveTags
}
// GetRemoveTagsOk returns a tuple with the RemoveTags field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrackRequest) GetRemoveTagsOk() ([]string, bool) {
if o == nil || IsNil(o.RemoveTags) {
return nil, false
}
return o.RemoveTags, true
}
// HasRemoveTags returns a boolean if a field has been set.
func (o *TrackRequest) HasRemoveTags() bool {
if o != nil && !IsNil(o.RemoveTags) {
return true
}
return false
}
// SetRemoveTags gets a reference to the given []string and assigns it to the RemoveTags field.
func (o *TrackRequest) SetRemoveTags(v []string) {
o.RemoveTags = v
}
func (o TrackRequest) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TrackRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Email) {
toSerialize["email"] = o.Email
}
if !IsNil(o.AddTags) {
toSerialize["addTags"] = o.AddTags
}
if !IsNil(o.RemoveTags) {
toSerialize["removeTags"] = o.RemoveTags
}
return toSerialize, nil
}
type NullableTrackRequest struct {
value *TrackRequest
isSet bool
}
func (v NullableTrackRequest) Get() *TrackRequest {
return v.value
}
func (v *NullableTrackRequest) Set(val *TrackRequest) {
v.value = val
v.isSet = true
}
func (v NullableTrackRequest) IsSet() bool {
return v.isSet
}
func (v *NullableTrackRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTrackRequest(val *TrackRequest) *NullableTrackRequest {
return &NullableTrackRequest{value: val, isSet: true}
}
func (v NullableTrackRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTrackRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}