bunnyshell.com/sdk@v0.16.0/model_user_kube_config_read.go (about) 1 /* 2 API Bunnyshell Environments 3 4 Interact with Bunnyshell Platform 5 6 API version: 1.1.0 7 Contact: osi+support@bunnyshell.com 8 */ 9 10 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 11 12 package sdk 13 14 import ( 15 "encoding/json" 16 ) 17 18 // checks if the UserKubeConfigRead type satisfies the MappedNullable interface at compile time 19 var _ MappedNullable = &UserKubeConfigRead{} 20 21 // UserKubeConfigRead struct for UserKubeConfigRead 22 type UserKubeConfigRead struct { 23 Token *string `json:"token,omitempty"` 24 ClientCertificateData *string `json:"client-certificate-data,omitempty"` 25 ClientKeyData *string `json:"client-key-data,omitempty"` 26 } 27 28 // NewUserKubeConfigRead instantiates a new UserKubeConfigRead 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 NewUserKubeConfigRead() *UserKubeConfigRead { 33 this := UserKubeConfigRead{} 34 return &this 35 } 36 37 // NewUserKubeConfigReadWithDefaults instantiates a new UserKubeConfigRead 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 NewUserKubeConfigReadWithDefaults() *UserKubeConfigRead { 41 this := UserKubeConfigRead{} 42 return &this 43 } 44 45 // GetToken returns the Token field value if set, zero value otherwise. 46 func (o *UserKubeConfigRead) GetToken() string { 47 if o == nil || IsNil(o.Token) { 48 var ret string 49 return ret 50 } 51 return *o.Token 52 } 53 54 // GetTokenOk returns a tuple with the Token field value if set, nil otherwise 55 // and a boolean to check if the value has been set. 56 func (o *UserKubeConfigRead) GetTokenOk() (*string, bool) { 57 if o == nil || IsNil(o.Token) { 58 return nil, false 59 } 60 return o.Token, true 61 } 62 63 // HasToken returns a boolean if a field has been set. 64 func (o *UserKubeConfigRead) HasToken() bool { 65 if o != nil && !IsNil(o.Token) { 66 return true 67 } 68 69 return false 70 } 71 72 // SetToken gets a reference to the given string and assigns it to the Token field. 73 func (o *UserKubeConfigRead) SetToken(v string) { 74 o.Token = &v 75 } 76 77 // GetClientCertificateData returns the ClientCertificateData field value if set, zero value otherwise. 78 func (o *UserKubeConfigRead) GetClientCertificateData() string { 79 if o == nil || IsNil(o.ClientCertificateData) { 80 var ret string 81 return ret 82 } 83 return *o.ClientCertificateData 84 } 85 86 // GetClientCertificateDataOk returns a tuple with the ClientCertificateData field value if set, nil otherwise 87 // and a boolean to check if the value has been set. 88 func (o *UserKubeConfigRead) GetClientCertificateDataOk() (*string, bool) { 89 if o == nil || IsNil(o.ClientCertificateData) { 90 return nil, false 91 } 92 return o.ClientCertificateData, true 93 } 94 95 // HasClientCertificateData returns a boolean if a field has been set. 96 func (o *UserKubeConfigRead) HasClientCertificateData() bool { 97 if o != nil && !IsNil(o.ClientCertificateData) { 98 return true 99 } 100 101 return false 102 } 103 104 // SetClientCertificateData gets a reference to the given string and assigns it to the ClientCertificateData field. 105 func (o *UserKubeConfigRead) SetClientCertificateData(v string) { 106 o.ClientCertificateData = &v 107 } 108 109 // GetClientKeyData returns the ClientKeyData field value if set, zero value otherwise. 110 func (o *UserKubeConfigRead) GetClientKeyData() string { 111 if o == nil || IsNil(o.ClientKeyData) { 112 var ret string 113 return ret 114 } 115 return *o.ClientKeyData 116 } 117 118 // GetClientKeyDataOk returns a tuple with the ClientKeyData field value if set, nil otherwise 119 // and a boolean to check if the value has been set. 120 func (o *UserKubeConfigRead) GetClientKeyDataOk() (*string, bool) { 121 if o == nil || IsNil(o.ClientKeyData) { 122 return nil, false 123 } 124 return o.ClientKeyData, true 125 } 126 127 // HasClientKeyData returns a boolean if a field has been set. 128 func (o *UserKubeConfigRead) HasClientKeyData() bool { 129 if o != nil && !IsNil(o.ClientKeyData) { 130 return true 131 } 132 133 return false 134 } 135 136 // SetClientKeyData gets a reference to the given string and assigns it to the ClientKeyData field. 137 func (o *UserKubeConfigRead) SetClientKeyData(v string) { 138 o.ClientKeyData = &v 139 } 140 141 func (o UserKubeConfigRead) MarshalJSON() ([]byte, error) { 142 toSerialize, err := o.ToMap() 143 if err != nil { 144 return []byte{}, err 145 } 146 return json.Marshal(toSerialize) 147 } 148 149 func (o UserKubeConfigRead) ToMap() (map[string]interface{}, error) { 150 toSerialize := map[string]interface{}{} 151 if !IsNil(o.Token) { 152 toSerialize["token"] = o.Token 153 } 154 if !IsNil(o.ClientCertificateData) { 155 toSerialize["client-certificate-data"] = o.ClientCertificateData 156 } 157 if !IsNil(o.ClientKeyData) { 158 toSerialize["client-key-data"] = o.ClientKeyData 159 } 160 return toSerialize, nil 161 } 162 163 type NullableUserKubeConfigRead struct { 164 value *UserKubeConfigRead 165 isSet bool 166 } 167 168 func (v NullableUserKubeConfigRead) Get() *UserKubeConfigRead { 169 return v.value 170 } 171 172 func (v *NullableUserKubeConfigRead) Set(val *UserKubeConfigRead) { 173 v.value = val 174 v.isSet = true 175 } 176 177 func (v NullableUserKubeConfigRead) IsSet() bool { 178 return v.isSet 179 } 180 181 func (v *NullableUserKubeConfigRead) Unset() { 182 v.value = nil 183 v.isSet = false 184 } 185 186 func NewNullableUserKubeConfigRead(val *UserKubeConfigRead) *NullableUserKubeConfigRead { 187 return &NullableUserKubeConfigRead{value: val, isSet: true} 188 } 189 190 func (v NullableUserKubeConfigRead) MarshalJSON() ([]byte, error) { 191 return json.Marshal(v.value) 192 } 193 194 func (v *NullableUserKubeConfigRead) UnmarshalJSON(src []byte) error { 195 v.isSet = true 196 return json.Unmarshal(src, &v.value) 197 }