github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_contract_owner_address.go (about) 1 /* 2 * Cios Openapi 3 * 4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 * 6 * API version: 1.0.1 7 */ 8 9 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 11 package cios 12 13 import ( 14 "encoding/json" 15 ) 16 17 // ContractOwnerAddress struct for ContractOwnerAddress 18 type ContractOwnerAddress struct { 19 // ISO 3166-1 alpha-2 20 Country *string `json:"country,omitempty"` 21 ZipCode *string `json:"zip_code,omitempty"` 22 State *string `json:"state,omitempty"` 23 City *string `json:"city,omitempty"` 24 Address1 *string `json:"address_1,omitempty"` 25 Address2 *string `json:"address_2,omitempty"` 26 Tags *[]string `json:"tags,omitempty"` 27 CustomFields *map[string]interface{} `json:"custom_fields,omitempty"` 28 } 29 30 // NewContractOwnerAddress instantiates a new ContractOwnerAddress object 31 // This constructor will assign default values to properties that have it defined, 32 // and makes sure properties required by API are set, but the set of arguments 33 // will change when the set of required properties is changed 34 func NewContractOwnerAddress() *ContractOwnerAddress { 35 this := ContractOwnerAddress{} 36 return &this 37 } 38 39 // NewContractOwnerAddressWithDefaults instantiates a new ContractOwnerAddress object 40 // This constructor will only assign default values to properties that have it defined, 41 // but it doesn't guarantee that properties required by API are set 42 func NewContractOwnerAddressWithDefaults() *ContractOwnerAddress { 43 this := ContractOwnerAddress{} 44 return &this 45 } 46 47 // GetCountry returns the Country field value if set, zero value otherwise. 48 func (o *ContractOwnerAddress) GetCountry() string { 49 if o == nil || o.Country == nil { 50 var ret string 51 return ret 52 } 53 return *o.Country 54 } 55 56 // GetCountryOk returns a tuple with the Country field value if set, nil otherwise 57 // and a boolean to check if the value has been set. 58 func (o *ContractOwnerAddress) GetCountryOk() (*string, bool) { 59 if o == nil || o.Country == nil { 60 return nil, false 61 } 62 return o.Country, true 63 } 64 65 // HasCountry returns a boolean if a field has been set. 66 func (o *ContractOwnerAddress) HasCountry() bool { 67 if o != nil && o.Country != nil { 68 return true 69 } 70 71 return false 72 } 73 74 // SetCountry gets a reference to the given string and assigns it to the Country field. 75 func (o *ContractOwnerAddress) SetCountry(v string) { 76 o.Country = &v 77 } 78 79 // GetZipCode returns the ZipCode field value if set, zero value otherwise. 80 func (o *ContractOwnerAddress) GetZipCode() string { 81 if o == nil || o.ZipCode == nil { 82 var ret string 83 return ret 84 } 85 return *o.ZipCode 86 } 87 88 // GetZipCodeOk returns a tuple with the ZipCode field value if set, nil otherwise 89 // and a boolean to check if the value has been set. 90 func (o *ContractOwnerAddress) GetZipCodeOk() (*string, bool) { 91 if o == nil || o.ZipCode == nil { 92 return nil, false 93 } 94 return o.ZipCode, true 95 } 96 97 // HasZipCode returns a boolean if a field has been set. 98 func (o *ContractOwnerAddress) HasZipCode() bool { 99 if o != nil && o.ZipCode != nil { 100 return true 101 } 102 103 return false 104 } 105 106 // SetZipCode gets a reference to the given string and assigns it to the ZipCode field. 107 func (o *ContractOwnerAddress) SetZipCode(v string) { 108 o.ZipCode = &v 109 } 110 111 // GetState returns the State field value if set, zero value otherwise. 112 func (o *ContractOwnerAddress) GetState() string { 113 if o == nil || o.State == nil { 114 var ret string 115 return ret 116 } 117 return *o.State 118 } 119 120 // GetStateOk returns a tuple with the State field value if set, nil otherwise 121 // and a boolean to check if the value has been set. 122 func (o *ContractOwnerAddress) GetStateOk() (*string, bool) { 123 if o == nil || o.State == nil { 124 return nil, false 125 } 126 return o.State, true 127 } 128 129 // HasState returns a boolean if a field has been set. 130 func (o *ContractOwnerAddress) HasState() bool { 131 if o != nil && o.State != nil { 132 return true 133 } 134 135 return false 136 } 137 138 // SetState gets a reference to the given string and assigns it to the State field. 139 func (o *ContractOwnerAddress) SetState(v string) { 140 o.State = &v 141 } 142 143 // GetCity returns the City field value if set, zero value otherwise. 144 func (o *ContractOwnerAddress) GetCity() string { 145 if o == nil || o.City == nil { 146 var ret string 147 return ret 148 } 149 return *o.City 150 } 151 152 // GetCityOk returns a tuple with the City field value if set, nil otherwise 153 // and a boolean to check if the value has been set. 154 func (o *ContractOwnerAddress) GetCityOk() (*string, bool) { 155 if o == nil || o.City == nil { 156 return nil, false 157 } 158 return o.City, true 159 } 160 161 // HasCity returns a boolean if a field has been set. 162 func (o *ContractOwnerAddress) HasCity() bool { 163 if o != nil && o.City != nil { 164 return true 165 } 166 167 return false 168 } 169 170 // SetCity gets a reference to the given string and assigns it to the City field. 171 func (o *ContractOwnerAddress) SetCity(v string) { 172 o.City = &v 173 } 174 175 // GetAddress1 returns the Address1 field value if set, zero value otherwise. 176 func (o *ContractOwnerAddress) GetAddress1() string { 177 if o == nil || o.Address1 == nil { 178 var ret string 179 return ret 180 } 181 return *o.Address1 182 } 183 184 // GetAddress1Ok returns a tuple with the Address1 field value if set, nil otherwise 185 // and a boolean to check if the value has been set. 186 func (o *ContractOwnerAddress) GetAddress1Ok() (*string, bool) { 187 if o == nil || o.Address1 == nil { 188 return nil, false 189 } 190 return o.Address1, true 191 } 192 193 // HasAddress1 returns a boolean if a field has been set. 194 func (o *ContractOwnerAddress) HasAddress1() bool { 195 if o != nil && o.Address1 != nil { 196 return true 197 } 198 199 return false 200 } 201 202 // SetAddress1 gets a reference to the given string and assigns it to the Address1 field. 203 func (o *ContractOwnerAddress) SetAddress1(v string) { 204 o.Address1 = &v 205 } 206 207 // GetAddress2 returns the Address2 field value if set, zero value otherwise. 208 func (o *ContractOwnerAddress) GetAddress2() string { 209 if o == nil || o.Address2 == nil { 210 var ret string 211 return ret 212 } 213 return *o.Address2 214 } 215 216 // GetAddress2Ok returns a tuple with the Address2 field value if set, nil otherwise 217 // and a boolean to check if the value has been set. 218 func (o *ContractOwnerAddress) GetAddress2Ok() (*string, bool) { 219 if o == nil || o.Address2 == nil { 220 return nil, false 221 } 222 return o.Address2, true 223 } 224 225 // HasAddress2 returns a boolean if a field has been set. 226 func (o *ContractOwnerAddress) HasAddress2() bool { 227 if o != nil && o.Address2 != nil { 228 return true 229 } 230 231 return false 232 } 233 234 // SetAddress2 gets a reference to the given string and assigns it to the Address2 field. 235 func (o *ContractOwnerAddress) SetAddress2(v string) { 236 o.Address2 = &v 237 } 238 239 // GetTags returns the Tags field value if set, zero value otherwise. 240 func (o *ContractOwnerAddress) GetTags() []string { 241 if o == nil || o.Tags == nil { 242 var ret []string 243 return ret 244 } 245 return *o.Tags 246 } 247 248 // GetTagsOk returns a tuple with the Tags field value if set, nil otherwise 249 // and a boolean to check if the value has been set. 250 func (o *ContractOwnerAddress) GetTagsOk() (*[]string, bool) { 251 if o == nil || o.Tags == nil { 252 return nil, false 253 } 254 return o.Tags, true 255 } 256 257 // HasTags returns a boolean if a field has been set. 258 func (o *ContractOwnerAddress) HasTags() bool { 259 if o != nil && o.Tags != nil { 260 return true 261 } 262 263 return false 264 } 265 266 // SetTags gets a reference to the given []string and assigns it to the Tags field. 267 func (o *ContractOwnerAddress) SetTags(v []string) { 268 o.Tags = &v 269 } 270 271 // GetCustomFields returns the CustomFields field value if set, zero value otherwise. 272 func (o *ContractOwnerAddress) GetCustomFields() map[string]interface{} { 273 if o == nil || o.CustomFields == nil { 274 var ret map[string]interface{} 275 return ret 276 } 277 return *o.CustomFields 278 } 279 280 // GetCustomFieldsOk returns a tuple with the CustomFields field value if set, nil otherwise 281 // and a boolean to check if the value has been set. 282 func (o *ContractOwnerAddress) GetCustomFieldsOk() (*map[string]interface{}, bool) { 283 if o == nil || o.CustomFields == nil { 284 return nil, false 285 } 286 return o.CustomFields, true 287 } 288 289 // HasCustomFields returns a boolean if a field has been set. 290 func (o *ContractOwnerAddress) HasCustomFields() bool { 291 if o != nil && o.CustomFields != nil { 292 return true 293 } 294 295 return false 296 } 297 298 // SetCustomFields gets a reference to the given map[string]interface{} and assigns it to the CustomFields field. 299 func (o *ContractOwnerAddress) SetCustomFields(v map[string]interface{}) { 300 o.CustomFields = &v 301 } 302 303 func (o ContractOwnerAddress) MarshalJSON() ([]byte, error) { 304 toSerialize := map[string]interface{}{} 305 if o.Country != nil { 306 toSerialize["country"] = o.Country 307 } 308 if o.ZipCode != nil { 309 toSerialize["zip_code"] = o.ZipCode 310 } 311 if o.State != nil { 312 toSerialize["state"] = o.State 313 } 314 if o.City != nil { 315 toSerialize["city"] = o.City 316 } 317 if o.Address1 != nil { 318 toSerialize["address_1"] = o.Address1 319 } 320 if o.Address2 != nil { 321 toSerialize["address_2"] = o.Address2 322 } 323 if o.Tags != nil { 324 toSerialize["tags"] = o.Tags 325 } 326 if o.CustomFields != nil { 327 toSerialize["custom_fields"] = o.CustomFields 328 } 329 return json.Marshal(toSerialize) 330 } 331 332 type NullableContractOwnerAddress struct { 333 value *ContractOwnerAddress 334 isSet bool 335 } 336 337 func (v NullableContractOwnerAddress) Get() *ContractOwnerAddress { 338 return v.value 339 } 340 341 func (v *NullableContractOwnerAddress) Set(val *ContractOwnerAddress) { 342 v.value = val 343 v.isSet = true 344 } 345 346 func (v NullableContractOwnerAddress) IsSet() bool { 347 return v.isSet 348 } 349 350 func (v *NullableContractOwnerAddress) Unset() { 351 v.value = nil 352 v.isSet = false 353 } 354 355 func NewNullableContractOwnerAddress(val *ContractOwnerAddress) *NullableContractOwnerAddress { 356 return &NullableContractOwnerAddress{value: val, isSet: true} 357 } 358 359 func (v NullableContractOwnerAddress) MarshalJSON() ([]byte, error) { 360 return json.Marshal(v.value) 361 } 362 363 func (v *NullableContractOwnerAddress) UnmarshalJSON(src []byte) error { 364 v.isSet = true 365 return json.Unmarshal(src, &v.value) 366 } 367 368