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