github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_device_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 // DeviceClient struct for DeviceClient 18 type DeviceClient struct { 19 ClientId *string `json:"client_id,omitempty"` 20 ClientSecret *string `json:"client_secret,omitempty"` 21 // PEM 22 RsaPublickey *string `json:"rsa_publickey,omitempty"` 23 DisplayName *string `json:"display_name,omitempty"` 24 } 25 26 // NewDeviceClient instantiates a new DeviceClient 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 NewDeviceClient() *DeviceClient { 31 this := DeviceClient{} 32 return &this 33 } 34 35 // NewDeviceClientWithDefaults instantiates a new DeviceClient 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 NewDeviceClientWithDefaults() *DeviceClient { 39 this := DeviceClient{} 40 return &this 41 } 42 43 // GetClientId returns the ClientId field value if set, zero value otherwise. 44 func (o *DeviceClient) GetClientId() string { 45 if o == nil || o.ClientId == nil { 46 var ret string 47 return ret 48 } 49 return *o.ClientId 50 } 51 52 // GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise 53 // and a boolean to check if the value has been set. 54 func (o *DeviceClient) GetClientIdOk() (*string, bool) { 55 if o == nil || o.ClientId == nil { 56 return nil, false 57 } 58 return o.ClientId, true 59 } 60 61 // HasClientId returns a boolean if a field has been set. 62 func (o *DeviceClient) HasClientId() bool { 63 if o != nil && o.ClientId != nil { 64 return true 65 } 66 67 return false 68 } 69 70 // SetClientId gets a reference to the given string and assigns it to the ClientId field. 71 func (o *DeviceClient) SetClientId(v string) { 72 o.ClientId = &v 73 } 74 75 // GetClientSecret returns the ClientSecret field value if set, zero value otherwise. 76 func (o *DeviceClient) GetClientSecret() string { 77 if o == nil || o.ClientSecret == nil { 78 var ret string 79 return ret 80 } 81 return *o.ClientSecret 82 } 83 84 // GetClientSecretOk returns a tuple with the ClientSecret field value if set, nil otherwise 85 // and a boolean to check if the value has been set. 86 func (o *DeviceClient) GetClientSecretOk() (*string, bool) { 87 if o == nil || o.ClientSecret == nil { 88 return nil, false 89 } 90 return o.ClientSecret, true 91 } 92 93 // HasClientSecret returns a boolean if a field has been set. 94 func (o *DeviceClient) HasClientSecret() bool { 95 if o != nil && o.ClientSecret != nil { 96 return true 97 } 98 99 return false 100 } 101 102 // SetClientSecret gets a reference to the given string and assigns it to the ClientSecret field. 103 func (o *DeviceClient) SetClientSecret(v string) { 104 o.ClientSecret = &v 105 } 106 107 // GetRsaPublickey returns the RsaPublickey field value if set, zero value otherwise. 108 func (o *DeviceClient) GetRsaPublickey() string { 109 if o == nil || o.RsaPublickey == nil { 110 var ret string 111 return ret 112 } 113 return *o.RsaPublickey 114 } 115 116 // GetRsaPublickeyOk returns a tuple with the RsaPublickey field value if set, nil otherwise 117 // and a boolean to check if the value has been set. 118 func (o *DeviceClient) GetRsaPublickeyOk() (*string, bool) { 119 if o == nil || o.RsaPublickey == nil { 120 return nil, false 121 } 122 return o.RsaPublickey, true 123 } 124 125 // HasRsaPublickey returns a boolean if a field has been set. 126 func (o *DeviceClient) HasRsaPublickey() bool { 127 if o != nil && o.RsaPublickey != nil { 128 return true 129 } 130 131 return false 132 } 133 134 // SetRsaPublickey gets a reference to the given string and assigns it to the RsaPublickey field. 135 func (o *DeviceClient) SetRsaPublickey(v string) { 136 o.RsaPublickey = &v 137 } 138 139 // GetDisplayName returns the DisplayName field value if set, zero value otherwise. 140 func (o *DeviceClient) GetDisplayName() string { 141 if o == nil || o.DisplayName == nil { 142 var ret string 143 return ret 144 } 145 return *o.DisplayName 146 } 147 148 // GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise 149 // and a boolean to check if the value has been set. 150 func (o *DeviceClient) GetDisplayNameOk() (*string, bool) { 151 if o == nil || o.DisplayName == nil { 152 return nil, false 153 } 154 return o.DisplayName, true 155 } 156 157 // HasDisplayName returns a boolean if a field has been set. 158 func (o *DeviceClient) HasDisplayName() bool { 159 if o != nil && o.DisplayName != nil { 160 return true 161 } 162 163 return false 164 } 165 166 // SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. 167 func (o *DeviceClient) SetDisplayName(v string) { 168 o.DisplayName = &v 169 } 170 171 func (o DeviceClient) MarshalJSON() ([]byte, error) { 172 toSerialize := map[string]interface{}{} 173 if o.ClientId != nil { 174 toSerialize["client_id"] = o.ClientId 175 } 176 if o.ClientSecret != nil { 177 toSerialize["client_secret"] = o.ClientSecret 178 } 179 if o.RsaPublickey != nil { 180 toSerialize["rsa_publickey"] = o.RsaPublickey 181 } 182 if o.DisplayName != nil { 183 toSerialize["display_name"] = o.DisplayName 184 } 185 return json.Marshal(toSerialize) 186 } 187 188 type NullableDeviceClient struct { 189 value *DeviceClient 190 isSet bool 191 } 192 193 func (v NullableDeviceClient) Get() *DeviceClient { 194 return v.value 195 } 196 197 func (v *NullableDeviceClient) Set(val *DeviceClient) { 198 v.value = val 199 v.isSet = true 200 } 201 202 func (v NullableDeviceClient) IsSet() bool { 203 return v.isSet 204 } 205 206 func (v *NullableDeviceClient) Unset() { 207 v.value = nil 208 v.isSet = false 209 } 210 211 func NewNullableDeviceClient(val *DeviceClient) *NullableDeviceClient { 212 return &NullableDeviceClient{value: val, isSet: true} 213 } 214 215 func (v NullableDeviceClient) MarshalJSON() ([]byte, error) { 216 return json.Marshal(v.value) 217 } 218 219 func (v *NullableDeviceClient) UnmarshalJSON(src []byte) error { 220 v.isSet = true 221 return json.Unmarshal(src, &v.value) 222 } 223 224