github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_client.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  // Client struct for Client
    18  type Client struct {
    19  	ApplicationClient *ApplicationClient `json:"application_client,omitempty"`
    20  	DeviceClient *DeviceClient `json:"device_client,omitempty"`
    21  }
    22  
    23  // NewClient instantiates a new Client object
    24  // This constructor will assign default values to properties that have it defined,
    25  // and makes sure properties required by API are set, but the set of arguments
    26  // will change when the set of required properties is changed
    27  func NewClient() *Client {
    28  	this := Client{}
    29  	return &this
    30  }
    31  
    32  // NewClientWithDefaults instantiates a new Client object
    33  // This constructor will only assign default values to properties that have it defined,
    34  // but it doesn't guarantee that properties required by API are set
    35  func NewClientWithDefaults() *Client {
    36  	this := Client{}
    37  	return &this
    38  }
    39  
    40  // GetApplicationClient returns the ApplicationClient field value if set, zero value otherwise.
    41  func (o *Client) GetApplicationClient() ApplicationClient {
    42  	if o == nil || o.ApplicationClient == nil {
    43  		var ret ApplicationClient
    44  		return ret
    45  	}
    46  	return *o.ApplicationClient
    47  }
    48  
    49  // GetApplicationClientOk returns a tuple with the ApplicationClient field value if set, nil otherwise
    50  // and a boolean to check if the value has been set.
    51  func (o *Client) GetApplicationClientOk() (*ApplicationClient, bool) {
    52  	if o == nil || o.ApplicationClient == nil {
    53  		return nil, false
    54  	}
    55  	return o.ApplicationClient, true
    56  }
    57  
    58  // HasApplicationClient returns a boolean if a field has been set.
    59  func (o *Client) HasApplicationClient() bool {
    60  	if o != nil && o.ApplicationClient != nil {
    61  		return true
    62  	}
    63  
    64  	return false
    65  }
    66  
    67  // SetApplicationClient gets a reference to the given ApplicationClient and assigns it to the ApplicationClient field.
    68  func (o *Client) SetApplicationClient(v ApplicationClient) {
    69  	o.ApplicationClient = &v
    70  }
    71  
    72  // GetDeviceClient returns the DeviceClient field value if set, zero value otherwise.
    73  func (o *Client) GetDeviceClient() DeviceClient {
    74  	if o == nil || o.DeviceClient == nil {
    75  		var ret DeviceClient
    76  		return ret
    77  	}
    78  	return *o.DeviceClient
    79  }
    80  
    81  // GetDeviceClientOk returns a tuple with the DeviceClient field value if set, nil otherwise
    82  // and a boolean to check if the value has been set.
    83  func (o *Client) GetDeviceClientOk() (*DeviceClient, bool) {
    84  	if o == nil || o.DeviceClient == nil {
    85  		return nil, false
    86  	}
    87  	return o.DeviceClient, true
    88  }
    89  
    90  // HasDeviceClient returns a boolean if a field has been set.
    91  func (o *Client) HasDeviceClient() bool {
    92  	if o != nil && o.DeviceClient != nil {
    93  		return true
    94  	}
    95  
    96  	return false
    97  }
    98  
    99  // SetDeviceClient gets a reference to the given DeviceClient and assigns it to the DeviceClient field.
   100  func (o *Client) SetDeviceClient(v DeviceClient) {
   101  	o.DeviceClient = &v
   102  }
   103  
   104  func (o Client) MarshalJSON() ([]byte, error) {
   105  	toSerialize := map[string]interface{}{}
   106  	if o.ApplicationClient != nil {
   107  		toSerialize["application_client"] = o.ApplicationClient
   108  	}
   109  	if o.DeviceClient != nil {
   110  		toSerialize["device_client"] = o.DeviceClient
   111  	}
   112  	return json.Marshal(toSerialize)
   113  }
   114  
   115  type NullableClient struct {
   116  	value *Client
   117  	isSet bool
   118  }
   119  
   120  func (v NullableClient) Get() *Client {
   121  	return v.value
   122  }
   123  
   124  func (v *NullableClient) Set(val *Client) {
   125  	v.value = val
   126  	v.isSet = true
   127  }
   128  
   129  func (v NullableClient) IsSet() bool {
   130  	return v.isSet
   131  }
   132  
   133  func (v *NullableClient) Unset() {
   134  	v.value = nil
   135  	v.isSet = false
   136  }
   137  
   138  func NewNullableClient(val *Client) *NullableClient {
   139  	return &NullableClient{value: val, isSet: true}
   140  }
   141  
   142  func (v NullableClient) MarshalJSON() ([]byte, error) {
   143  	return json.Marshal(v.value)
   144  }
   145  
   146  func (v *NullableClient) UnmarshalJSON(src []byte) error {
   147  	v.isSet = true
   148  	return json.Unmarshal(src, &v.value)
   149  }
   150  
   151