github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_contract_owner.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  // ContractOwner struct for ContractOwner
    18  type ContractOwner struct {
    19  	Id *string `json:"id,omitempty"`
    20  	Name *string `json:"name,omitempty"`
    21  	PhoneNumber *string `json:"phone_number,omitempty"`
    22  	PhoneNumber2 *string `json:"phone_number_2,omitempty"`
    23  	Address *ContractOwnerAddress `json:"address,omitempty"`
    24  }
    25  
    26  // NewContractOwner instantiates a new ContractOwner object
    27  // This constructor will assign default values to properties that have it defined,
    28  // and makes sure properties required by API are set, but the set of arguments
    29  // will change when the set of required properties is changed
    30  func NewContractOwner() *ContractOwner {
    31  	this := ContractOwner{}
    32  	return &this
    33  }
    34  
    35  // NewContractOwnerWithDefaults instantiates a new ContractOwner object
    36  // This constructor will only assign default values to properties that have it defined,
    37  // but it doesn't guarantee that properties required by API are set
    38  func NewContractOwnerWithDefaults() *ContractOwner {
    39  	this := ContractOwner{}
    40  	return &this
    41  }
    42  
    43  // GetId returns the Id field value if set, zero value otherwise.
    44  func (o *ContractOwner) GetId() string {
    45  	if o == nil || o.Id == nil {
    46  		var ret string
    47  		return ret
    48  	}
    49  	return *o.Id
    50  }
    51  
    52  // GetIdOk returns a tuple with the Id field value if set, nil otherwise
    53  // and a boolean to check if the value has been set.
    54  func (o *ContractOwner) GetIdOk() (*string, bool) {
    55  	if o == nil || o.Id == nil {
    56  		return nil, false
    57  	}
    58  	return o.Id, true
    59  }
    60  
    61  // HasId returns a boolean if a field has been set.
    62  func (o *ContractOwner) HasId() bool {
    63  	if o != nil && o.Id != nil {
    64  		return true
    65  	}
    66  
    67  	return false
    68  }
    69  
    70  // SetId gets a reference to the given string and assigns it to the Id field.
    71  func (o *ContractOwner) SetId(v string) {
    72  	o.Id = &v
    73  }
    74  
    75  // GetName returns the Name field value if set, zero value otherwise.
    76  func (o *ContractOwner) GetName() string {
    77  	if o == nil || o.Name == nil {
    78  		var ret string
    79  		return ret
    80  	}
    81  	return *o.Name
    82  }
    83  
    84  // GetNameOk returns a tuple with the Name field value if set, nil otherwise
    85  // and a boolean to check if the value has been set.
    86  func (o *ContractOwner) GetNameOk() (*string, bool) {
    87  	if o == nil || o.Name == nil {
    88  		return nil, false
    89  	}
    90  	return o.Name, true
    91  }
    92  
    93  // HasName returns a boolean if a field has been set.
    94  func (o *ContractOwner) HasName() bool {
    95  	if o != nil && o.Name != nil {
    96  		return true
    97  	}
    98  
    99  	return false
   100  }
   101  
   102  // SetName gets a reference to the given string and assigns it to the Name field.
   103  func (o *ContractOwner) SetName(v string) {
   104  	o.Name = &v
   105  }
   106  
   107  // GetPhoneNumber returns the PhoneNumber field value if set, zero value otherwise.
   108  func (o *ContractOwner) GetPhoneNumber() string {
   109  	if o == nil || o.PhoneNumber == nil {
   110  		var ret string
   111  		return ret
   112  	}
   113  	return *o.PhoneNumber
   114  }
   115  
   116  // GetPhoneNumberOk returns a tuple with the PhoneNumber field value if set, nil otherwise
   117  // and a boolean to check if the value has been set.
   118  func (o *ContractOwner) GetPhoneNumberOk() (*string, bool) {
   119  	if o == nil || o.PhoneNumber == nil {
   120  		return nil, false
   121  	}
   122  	return o.PhoneNumber, true
   123  }
   124  
   125  // HasPhoneNumber returns a boolean if a field has been set.
   126  func (o *ContractOwner) HasPhoneNumber() bool {
   127  	if o != nil && o.PhoneNumber != nil {
   128  		return true
   129  	}
   130  
   131  	return false
   132  }
   133  
   134  // SetPhoneNumber gets a reference to the given string and assigns it to the PhoneNumber field.
   135  func (o *ContractOwner) SetPhoneNumber(v string) {
   136  	o.PhoneNumber = &v
   137  }
   138  
   139  // GetPhoneNumber2 returns the PhoneNumber2 field value if set, zero value otherwise.
   140  func (o *ContractOwner) GetPhoneNumber2() string {
   141  	if o == nil || o.PhoneNumber2 == nil {
   142  		var ret string
   143  		return ret
   144  	}
   145  	return *o.PhoneNumber2
   146  }
   147  
   148  // GetPhoneNumber2Ok returns a tuple with the PhoneNumber2 field value if set, nil otherwise
   149  // and a boolean to check if the value has been set.
   150  func (o *ContractOwner) GetPhoneNumber2Ok() (*string, bool) {
   151  	if o == nil || o.PhoneNumber2 == nil {
   152  		return nil, false
   153  	}
   154  	return o.PhoneNumber2, true
   155  }
   156  
   157  // HasPhoneNumber2 returns a boolean if a field has been set.
   158  func (o *ContractOwner) HasPhoneNumber2() bool {
   159  	if o != nil && o.PhoneNumber2 != nil {
   160  		return true
   161  	}
   162  
   163  	return false
   164  }
   165  
   166  // SetPhoneNumber2 gets a reference to the given string and assigns it to the PhoneNumber2 field.
   167  func (o *ContractOwner) SetPhoneNumber2(v string) {
   168  	o.PhoneNumber2 = &v
   169  }
   170  
   171  // GetAddress returns the Address field value if set, zero value otherwise.
   172  func (o *ContractOwner) GetAddress() ContractOwnerAddress {
   173  	if o == nil || o.Address == nil {
   174  		var ret ContractOwnerAddress
   175  		return ret
   176  	}
   177  	return *o.Address
   178  }
   179  
   180  // GetAddressOk returns a tuple with the Address field value if set, nil otherwise
   181  // and a boolean to check if the value has been set.
   182  func (o *ContractOwner) GetAddressOk() (*ContractOwnerAddress, bool) {
   183  	if o == nil || o.Address == nil {
   184  		return nil, false
   185  	}
   186  	return o.Address, true
   187  }
   188  
   189  // HasAddress returns a boolean if a field has been set.
   190  func (o *ContractOwner) HasAddress() bool {
   191  	if o != nil && o.Address != nil {
   192  		return true
   193  	}
   194  
   195  	return false
   196  }
   197  
   198  // SetAddress gets a reference to the given ContractOwnerAddress and assigns it to the Address field.
   199  func (o *ContractOwner) SetAddress(v ContractOwnerAddress) {
   200  	o.Address = &v
   201  }
   202  
   203  func (o ContractOwner) MarshalJSON() ([]byte, error) {
   204  	toSerialize := map[string]interface{}{}
   205  	if o.Id != nil {
   206  		toSerialize["id"] = o.Id
   207  	}
   208  	if o.Name != nil {
   209  		toSerialize["name"] = o.Name
   210  	}
   211  	if o.PhoneNumber != nil {
   212  		toSerialize["phone_number"] = o.PhoneNumber
   213  	}
   214  	if o.PhoneNumber2 != nil {
   215  		toSerialize["phone_number_2"] = o.PhoneNumber2
   216  	}
   217  	if o.Address != nil {
   218  		toSerialize["address"] = o.Address
   219  	}
   220  	return json.Marshal(toSerialize)
   221  }
   222  
   223  type NullableContractOwner struct {
   224  	value *ContractOwner
   225  	isSet bool
   226  }
   227  
   228  func (v NullableContractOwner) Get() *ContractOwner {
   229  	return v.value
   230  }
   231  
   232  func (v *NullableContractOwner) Set(val *ContractOwner) {
   233  	v.value = val
   234  	v.isSet = true
   235  }
   236  
   237  func (v NullableContractOwner) IsSet() bool {
   238  	return v.isSet
   239  }
   240  
   241  func (v *NullableContractOwner) Unset() {
   242  	v.value = nil
   243  	v.isSet = false
   244  }
   245  
   246  func NewNullableContractOwner(val *ContractOwner) *NullableContractOwner {
   247  	return &NullableContractOwner{value: val, isSet: true}
   248  }
   249  
   250  func (v NullableContractOwner) MarshalJSON() ([]byte, error) {
   251  	return json.Marshal(v.value)
   252  }
   253  
   254  func (v *NullableContractOwner) UnmarshalJSON(src []byte) error {
   255  	v.isSet = true
   256  	return json.Unmarshal(src, &v.value)
   257  }
   258  
   259