github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_group_replace_request.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 // GroupReplaceRequest struct for GroupReplaceRequest 18 type GroupReplaceRequest struct { 19 ParentGroupId *string `json:"parent_group_id,omitempty"` 20 Name *string `json:"name,omitempty"` 21 Type *string `json:"type,omitempty"` 22 PhoneNumber *string `json:"phone_number,omitempty"` 23 PhoneNumber2 *string `json:"phone_number_2,omitempty"` 24 Address *GroupAddress `json:"address,omitempty"` 25 Tags *[]string `json:"tags,omitempty"` 26 } 27 28 // NewGroupReplaceRequest instantiates a new GroupReplaceRequest object 29 // This constructor will assign default values to properties that have it defined, 30 // and makes sure properties required by API are set, but the set of arguments 31 // will change when the set of required properties is changed 32 func NewGroupReplaceRequest() *GroupReplaceRequest { 33 this := GroupReplaceRequest{} 34 return &this 35 } 36 37 // NewGroupReplaceRequestWithDefaults instantiates a new GroupReplaceRequest object 38 // This constructor will only assign default values to properties that have it defined, 39 // but it doesn't guarantee that properties required by API are set 40 func NewGroupReplaceRequestWithDefaults() *GroupReplaceRequest { 41 this := GroupReplaceRequest{} 42 return &this 43 } 44 45 // GetParentGroupId returns the ParentGroupId field value if set, zero value otherwise. 46 func (o *GroupReplaceRequest) GetParentGroupId() string { 47 if o == nil || o.ParentGroupId == nil { 48 var ret string 49 return ret 50 } 51 return *o.ParentGroupId 52 } 53 54 // GetParentGroupIdOk returns a tuple with the ParentGroupId field value if set, nil otherwise 55 // and a boolean to check if the value has been set. 56 func (o *GroupReplaceRequest) GetParentGroupIdOk() (*string, bool) { 57 if o == nil || o.ParentGroupId == nil { 58 return nil, false 59 } 60 return o.ParentGroupId, true 61 } 62 63 // HasParentGroupId returns a boolean if a field has been set. 64 func (o *GroupReplaceRequest) HasParentGroupId() bool { 65 if o != nil && o.ParentGroupId != nil { 66 return true 67 } 68 69 return false 70 } 71 72 // SetParentGroupId gets a reference to the given string and assigns it to the ParentGroupId field. 73 func (o *GroupReplaceRequest) SetParentGroupId(v string) { 74 o.ParentGroupId = &v 75 } 76 77 // GetName returns the Name field value if set, zero value otherwise. 78 func (o *GroupReplaceRequest) GetName() string { 79 if o == nil || o.Name == nil { 80 var ret string 81 return ret 82 } 83 return *o.Name 84 } 85 86 // GetNameOk returns a tuple with the Name field value if set, nil otherwise 87 // and a boolean to check if the value has been set. 88 func (o *GroupReplaceRequest) GetNameOk() (*string, bool) { 89 if o == nil || o.Name == nil { 90 return nil, false 91 } 92 return o.Name, true 93 } 94 95 // HasName returns a boolean if a field has been set. 96 func (o *GroupReplaceRequest) HasName() bool { 97 if o != nil && o.Name != nil { 98 return true 99 } 100 101 return false 102 } 103 104 // SetName gets a reference to the given string and assigns it to the Name field. 105 func (o *GroupReplaceRequest) SetName(v string) { 106 o.Name = &v 107 } 108 109 // GetType returns the Type field value if set, zero value otherwise. 110 func (o *GroupReplaceRequest) GetType() string { 111 if o == nil || o.Type == nil { 112 var ret string 113 return ret 114 } 115 return *o.Type 116 } 117 118 // GetTypeOk returns a tuple with the Type field value if set, nil otherwise 119 // and a boolean to check if the value has been set. 120 func (o *GroupReplaceRequest) GetTypeOk() (*string, bool) { 121 if o == nil || o.Type == nil { 122 return nil, false 123 } 124 return o.Type, true 125 } 126 127 // HasType returns a boolean if a field has been set. 128 func (o *GroupReplaceRequest) HasType() bool { 129 if o != nil && o.Type != nil { 130 return true 131 } 132 133 return false 134 } 135 136 // SetType gets a reference to the given string and assigns it to the Type field. 137 func (o *GroupReplaceRequest) SetType(v string) { 138 o.Type = &v 139 } 140 141 // GetPhoneNumber returns the PhoneNumber field value if set, zero value otherwise. 142 func (o *GroupReplaceRequest) GetPhoneNumber() string { 143 if o == nil || o.PhoneNumber == nil { 144 var ret string 145 return ret 146 } 147 return *o.PhoneNumber 148 } 149 150 // GetPhoneNumberOk returns a tuple with the PhoneNumber field value if set, nil otherwise 151 // and a boolean to check if the value has been set. 152 func (o *GroupReplaceRequest) GetPhoneNumberOk() (*string, bool) { 153 if o == nil || o.PhoneNumber == nil { 154 return nil, false 155 } 156 return o.PhoneNumber, true 157 } 158 159 // HasPhoneNumber returns a boolean if a field has been set. 160 func (o *GroupReplaceRequest) HasPhoneNumber() bool { 161 if o != nil && o.PhoneNumber != nil { 162 return true 163 } 164 165 return false 166 } 167 168 // SetPhoneNumber gets a reference to the given string and assigns it to the PhoneNumber field. 169 func (o *GroupReplaceRequest) SetPhoneNumber(v string) { 170 o.PhoneNumber = &v 171 } 172 173 // GetPhoneNumber2 returns the PhoneNumber2 field value if set, zero value otherwise. 174 func (o *GroupReplaceRequest) GetPhoneNumber2() string { 175 if o == nil || o.PhoneNumber2 == nil { 176 var ret string 177 return ret 178 } 179 return *o.PhoneNumber2 180 } 181 182 // GetPhoneNumber2Ok returns a tuple with the PhoneNumber2 field value if set, nil otherwise 183 // and a boolean to check if the value has been set. 184 func (o *GroupReplaceRequest) GetPhoneNumber2Ok() (*string, bool) { 185 if o == nil || o.PhoneNumber2 == nil { 186 return nil, false 187 } 188 return o.PhoneNumber2, true 189 } 190 191 // HasPhoneNumber2 returns a boolean if a field has been set. 192 func (o *GroupReplaceRequest) HasPhoneNumber2() bool { 193 if o != nil && o.PhoneNumber2 != nil { 194 return true 195 } 196 197 return false 198 } 199 200 // SetPhoneNumber2 gets a reference to the given string and assigns it to the PhoneNumber2 field. 201 func (o *GroupReplaceRequest) SetPhoneNumber2(v string) { 202 o.PhoneNumber2 = &v 203 } 204 205 // GetAddress returns the Address field value if set, zero value otherwise. 206 func (o *GroupReplaceRequest) GetAddress() GroupAddress { 207 if o == nil || o.Address == nil { 208 var ret GroupAddress 209 return ret 210 } 211 return *o.Address 212 } 213 214 // GetAddressOk returns a tuple with the Address field value if set, nil otherwise 215 // and a boolean to check if the value has been set. 216 func (o *GroupReplaceRequest) GetAddressOk() (*GroupAddress, bool) { 217 if o == nil || o.Address == nil { 218 return nil, false 219 } 220 return o.Address, true 221 } 222 223 // HasAddress returns a boolean if a field has been set. 224 func (o *GroupReplaceRequest) HasAddress() bool { 225 if o != nil && o.Address != nil { 226 return true 227 } 228 229 return false 230 } 231 232 // SetAddress gets a reference to the given GroupAddress and assigns it to the Address field. 233 func (o *GroupReplaceRequest) SetAddress(v GroupAddress) { 234 o.Address = &v 235 } 236 237 // GetTags returns the Tags field value if set, zero value otherwise. 238 func (o *GroupReplaceRequest) GetTags() []string { 239 if o == nil || o.Tags == nil { 240 var ret []string 241 return ret 242 } 243 return *o.Tags 244 } 245 246 // GetTagsOk returns a tuple with the Tags field value if set, nil otherwise 247 // and a boolean to check if the value has been set. 248 func (o *GroupReplaceRequest) GetTagsOk() (*[]string, bool) { 249 if o == nil || o.Tags == nil { 250 return nil, false 251 } 252 return o.Tags, true 253 } 254 255 // HasTags returns a boolean if a field has been set. 256 func (o *GroupReplaceRequest) HasTags() bool { 257 if o != nil && o.Tags != nil { 258 return true 259 } 260 261 return false 262 } 263 264 // SetTags gets a reference to the given []string and assigns it to the Tags field. 265 func (o *GroupReplaceRequest) SetTags(v []string) { 266 o.Tags = &v 267 } 268 269 func (o GroupReplaceRequest) MarshalJSON() ([]byte, error) { 270 toSerialize := map[string]interface{}{} 271 if o.ParentGroupId != nil { 272 toSerialize["parent_group_id"] = o.ParentGroupId 273 } 274 if o.Name != nil { 275 toSerialize["name"] = o.Name 276 } 277 if o.Type != nil { 278 toSerialize["type"] = o.Type 279 } 280 if o.PhoneNumber != nil { 281 toSerialize["phone_number"] = o.PhoneNumber 282 } 283 if o.PhoneNumber2 != nil { 284 toSerialize["phone_number_2"] = o.PhoneNumber2 285 } 286 if o.Address != nil { 287 toSerialize["address"] = o.Address 288 } 289 if o.Tags != nil { 290 toSerialize["tags"] = o.Tags 291 } 292 return json.Marshal(toSerialize) 293 } 294 295 type NullableGroupReplaceRequest struct { 296 value *GroupReplaceRequest 297 isSet bool 298 } 299 300 func (v NullableGroupReplaceRequest) Get() *GroupReplaceRequest { 301 return v.value 302 } 303 304 func (v *NullableGroupReplaceRequest) Set(val *GroupReplaceRequest) { 305 v.value = val 306 v.isSet = true 307 } 308 309 func (v NullableGroupReplaceRequest) IsSet() bool { 310 return v.isSet 311 } 312 313 func (v *NullableGroupReplaceRequest) Unset() { 314 v.value = nil 315 v.isSet = false 316 } 317 318 func NewNullableGroupReplaceRequest(val *GroupReplaceRequest) *NullableGroupReplaceRequest { 319 return &NullableGroupReplaceRequest{value: val, isSet: true} 320 } 321 322 func (v NullableGroupReplaceRequest) MarshalJSON() ([]byte, error) { 323 return json.Marshal(v.value) 324 } 325 326 func (v *NullableGroupReplaceRequest) UnmarshalJSON(src []byte) error { 327 v.isSet = true 328 return json.Unmarshal(src, &v.value) 329 } 330 331