bunnyshell.com/sdk@v0.16.0/model_kubernetes_integration_item.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 KubernetesIntegrationItem type satisfies the MappedNullable interface at compile time 19 var _ MappedNullable = &KubernetesIntegrationItem{} 20 21 // KubernetesIntegrationItem A Kubernetes integration stores connection information for a Kubernetes cluster. 22 type KubernetesIntegrationItem struct { 23 // Kubernetes integration identifier. 24 Id *string `json:"id,omitempty"` 25 // Kubernetes integration cluster name. 26 ClusterName *string `json:"clusterName,omitempty"` 27 // Kubernetes integration cloud name. 28 CloudName *string `json:"cloudName,omitempty"` 29 // Kubernetes integration cluster provider. 30 CloudProvider *string `json:"cloudProvider,omitempty"` 31 // Kubernetes integration status. 32 Status *string `json:"status,omitempty"` 33 // Organization identifier. 34 Organization NullableString `json:"organization,omitempty"` 35 } 36 37 // NewKubernetesIntegrationItem instantiates a new KubernetesIntegrationItem object 38 // This constructor will assign default values to properties that have it defined, 39 // and makes sure properties required by API are set, but the set of arguments 40 // will change when the set of required properties is changed 41 func NewKubernetesIntegrationItem() *KubernetesIntegrationItem { 42 this := KubernetesIntegrationItem{} 43 return &this 44 } 45 46 // NewKubernetesIntegrationItemWithDefaults instantiates a new KubernetesIntegrationItem object 47 // This constructor will only assign default values to properties that have it defined, 48 // but it doesn't guarantee that properties required by API are set 49 func NewKubernetesIntegrationItemWithDefaults() *KubernetesIntegrationItem { 50 this := KubernetesIntegrationItem{} 51 return &this 52 } 53 54 // GetId returns the Id field value if set, zero value otherwise. 55 func (o *KubernetesIntegrationItem) GetId() string { 56 if o == nil || IsNil(o.Id) { 57 var ret string 58 return ret 59 } 60 return *o.Id 61 } 62 63 // GetIdOk returns a tuple with the Id field value if set, nil otherwise 64 // and a boolean to check if the value has been set. 65 func (o *KubernetesIntegrationItem) GetIdOk() (*string, bool) { 66 if o == nil || IsNil(o.Id) { 67 return nil, false 68 } 69 return o.Id, true 70 } 71 72 // HasId returns a boolean if a field has been set. 73 func (o *KubernetesIntegrationItem) HasId() bool { 74 if o != nil && !IsNil(o.Id) { 75 return true 76 } 77 78 return false 79 } 80 81 // SetId gets a reference to the given string and assigns it to the Id field. 82 func (o *KubernetesIntegrationItem) SetId(v string) { 83 o.Id = &v 84 } 85 86 // GetClusterName returns the ClusterName field value if set, zero value otherwise. 87 func (o *KubernetesIntegrationItem) GetClusterName() string { 88 if o == nil || IsNil(o.ClusterName) { 89 var ret string 90 return ret 91 } 92 return *o.ClusterName 93 } 94 95 // GetClusterNameOk returns a tuple with the ClusterName field value if set, nil otherwise 96 // and a boolean to check if the value has been set. 97 func (o *KubernetesIntegrationItem) GetClusterNameOk() (*string, bool) { 98 if o == nil || IsNil(o.ClusterName) { 99 return nil, false 100 } 101 return o.ClusterName, true 102 } 103 104 // HasClusterName returns a boolean if a field has been set. 105 func (o *KubernetesIntegrationItem) HasClusterName() bool { 106 if o != nil && !IsNil(o.ClusterName) { 107 return true 108 } 109 110 return false 111 } 112 113 // SetClusterName gets a reference to the given string and assigns it to the ClusterName field. 114 func (o *KubernetesIntegrationItem) SetClusterName(v string) { 115 o.ClusterName = &v 116 } 117 118 // GetCloudName returns the CloudName field value if set, zero value otherwise. 119 func (o *KubernetesIntegrationItem) GetCloudName() string { 120 if o == nil || IsNil(o.CloudName) { 121 var ret string 122 return ret 123 } 124 return *o.CloudName 125 } 126 127 // GetCloudNameOk returns a tuple with the CloudName field value if set, nil otherwise 128 // and a boolean to check if the value has been set. 129 func (o *KubernetesIntegrationItem) GetCloudNameOk() (*string, bool) { 130 if o == nil || IsNil(o.CloudName) { 131 return nil, false 132 } 133 return o.CloudName, true 134 } 135 136 // HasCloudName returns a boolean if a field has been set. 137 func (o *KubernetesIntegrationItem) HasCloudName() bool { 138 if o != nil && !IsNil(o.CloudName) { 139 return true 140 } 141 142 return false 143 } 144 145 // SetCloudName gets a reference to the given string and assigns it to the CloudName field. 146 func (o *KubernetesIntegrationItem) SetCloudName(v string) { 147 o.CloudName = &v 148 } 149 150 // GetCloudProvider returns the CloudProvider field value if set, zero value otherwise. 151 func (o *KubernetesIntegrationItem) GetCloudProvider() string { 152 if o == nil || IsNil(o.CloudProvider) { 153 var ret string 154 return ret 155 } 156 return *o.CloudProvider 157 } 158 159 // GetCloudProviderOk returns a tuple with the CloudProvider field value if set, nil otherwise 160 // and a boolean to check if the value has been set. 161 func (o *KubernetesIntegrationItem) GetCloudProviderOk() (*string, bool) { 162 if o == nil || IsNil(o.CloudProvider) { 163 return nil, false 164 } 165 return o.CloudProvider, true 166 } 167 168 // HasCloudProvider returns a boolean if a field has been set. 169 func (o *KubernetesIntegrationItem) HasCloudProvider() bool { 170 if o != nil && !IsNil(o.CloudProvider) { 171 return true 172 } 173 174 return false 175 } 176 177 // SetCloudProvider gets a reference to the given string and assigns it to the CloudProvider field. 178 func (o *KubernetesIntegrationItem) SetCloudProvider(v string) { 179 o.CloudProvider = &v 180 } 181 182 // GetStatus returns the Status field value if set, zero value otherwise. 183 func (o *KubernetesIntegrationItem) GetStatus() string { 184 if o == nil || IsNil(o.Status) { 185 var ret string 186 return ret 187 } 188 return *o.Status 189 } 190 191 // GetStatusOk returns a tuple with the Status field value if set, nil otherwise 192 // and a boolean to check if the value has been set. 193 func (o *KubernetesIntegrationItem) GetStatusOk() (*string, bool) { 194 if o == nil || IsNil(o.Status) { 195 return nil, false 196 } 197 return o.Status, true 198 } 199 200 // HasStatus returns a boolean if a field has been set. 201 func (o *KubernetesIntegrationItem) HasStatus() bool { 202 if o != nil && !IsNil(o.Status) { 203 return true 204 } 205 206 return false 207 } 208 209 // SetStatus gets a reference to the given string and assigns it to the Status field. 210 func (o *KubernetesIntegrationItem) SetStatus(v string) { 211 o.Status = &v 212 } 213 214 // GetOrganization returns the Organization field value if set, zero value otherwise (both if not set or set to explicit null). 215 func (o *KubernetesIntegrationItem) GetOrganization() string { 216 if o == nil || IsNil(o.Organization.Get()) { 217 var ret string 218 return ret 219 } 220 return *o.Organization.Get() 221 } 222 223 // GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise 224 // and a boolean to check if the value has been set. 225 // NOTE: If the value is an explicit nil, `nil, true` will be returned 226 func (o *KubernetesIntegrationItem) GetOrganizationOk() (*string, bool) { 227 if o == nil { 228 return nil, false 229 } 230 return o.Organization.Get(), o.Organization.IsSet() 231 } 232 233 // HasOrganization returns a boolean if a field has been set. 234 func (o *KubernetesIntegrationItem) HasOrganization() bool { 235 if o != nil && o.Organization.IsSet() { 236 return true 237 } 238 239 return false 240 } 241 242 // SetOrganization gets a reference to the given NullableString and assigns it to the Organization field. 243 func (o *KubernetesIntegrationItem) SetOrganization(v string) { 244 o.Organization.Set(&v) 245 } 246 247 // SetOrganizationNil sets the value for Organization to be an explicit nil 248 func (o *KubernetesIntegrationItem) SetOrganizationNil() { 249 o.Organization.Set(nil) 250 } 251 252 // UnsetOrganization ensures that no value is present for Organization, not even an explicit nil 253 func (o *KubernetesIntegrationItem) UnsetOrganization() { 254 o.Organization.Unset() 255 } 256 257 func (o KubernetesIntegrationItem) MarshalJSON() ([]byte, error) { 258 toSerialize, err := o.ToMap() 259 if err != nil { 260 return []byte{}, err 261 } 262 return json.Marshal(toSerialize) 263 } 264 265 func (o KubernetesIntegrationItem) ToMap() (map[string]interface{}, error) { 266 toSerialize := map[string]interface{}{} 267 if !IsNil(o.Id) { 268 toSerialize["id"] = o.Id 269 } 270 if !IsNil(o.ClusterName) { 271 toSerialize["clusterName"] = o.ClusterName 272 } 273 if !IsNil(o.CloudName) { 274 toSerialize["cloudName"] = o.CloudName 275 } 276 if !IsNil(o.CloudProvider) { 277 toSerialize["cloudProvider"] = o.CloudProvider 278 } 279 if !IsNil(o.Status) { 280 toSerialize["status"] = o.Status 281 } 282 if o.Organization.IsSet() { 283 toSerialize["organization"] = o.Organization.Get() 284 } 285 return toSerialize, nil 286 } 287 288 type NullableKubernetesIntegrationItem struct { 289 value *KubernetesIntegrationItem 290 isSet bool 291 } 292 293 func (v NullableKubernetesIntegrationItem) Get() *KubernetesIntegrationItem { 294 return v.value 295 } 296 297 func (v *NullableKubernetesIntegrationItem) Set(val *KubernetesIntegrationItem) { 298 v.value = val 299 v.isSet = true 300 } 301 302 func (v NullableKubernetesIntegrationItem) IsSet() bool { 303 return v.isSet 304 } 305 306 func (v *NullableKubernetesIntegrationItem) Unset() { 307 v.value = nil 308 v.isSet = false 309 } 310 311 func NewNullableKubernetesIntegrationItem(val *KubernetesIntegrationItem) *NullableKubernetesIntegrationItem { 312 return &NullableKubernetesIntegrationItem{value: val, isSet: true} 313 } 314 315 func (v NullableKubernetesIntegrationItem) MarshalJSON() ([]byte, error) { 316 return json.Marshal(v.value) 317 } 318 319 func (v *NullableKubernetesIntegrationItem) UnmarshalJSON(src []byte) error { 320 v.isSet = true 321 return json.Unmarshal(src, &v.value) 322 }