bunnyshell.com/sdk@v0.16.0/model_cluster_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 ClusterKubeConfigRead type satisfies the MappedNullable interface at compile time 19 var _ MappedNullable = &ClusterKubeConfigRead{} 20 21 // ClusterKubeConfigRead struct for ClusterKubeConfigRead 22 type ClusterKubeConfigRead struct { 23 CertificateAuthorityData string `json:"certificate-authority-data"` 24 Server string `json:"server"` 25 } 26 27 // NewClusterKubeConfigRead instantiates a new ClusterKubeConfigRead object 28 // This constructor will assign default values to properties that have it defined, 29 // and makes sure properties required by API are set, but the set of arguments 30 // will change when the set of required properties is changed 31 func NewClusterKubeConfigRead(certificateAuthorityData string, server string) *ClusterKubeConfigRead { 32 this := ClusterKubeConfigRead{} 33 this.CertificateAuthorityData = certificateAuthorityData 34 this.Server = server 35 return &this 36 } 37 38 // NewClusterKubeConfigReadWithDefaults instantiates a new ClusterKubeConfigRead object 39 // This constructor will only assign default values to properties that have it defined, 40 // but it doesn't guarantee that properties required by API are set 41 func NewClusterKubeConfigReadWithDefaults() *ClusterKubeConfigRead { 42 this := ClusterKubeConfigRead{} 43 return &this 44 } 45 46 // GetCertificateAuthorityData returns the CertificateAuthorityData field value 47 func (o *ClusterKubeConfigRead) GetCertificateAuthorityData() string { 48 if o == nil { 49 var ret string 50 return ret 51 } 52 53 return o.CertificateAuthorityData 54 } 55 56 // GetCertificateAuthorityDataOk returns a tuple with the CertificateAuthorityData field value 57 // and a boolean to check if the value has been set. 58 func (o *ClusterKubeConfigRead) GetCertificateAuthorityDataOk() (*string, bool) { 59 if o == nil { 60 return nil, false 61 } 62 return &o.CertificateAuthorityData, true 63 } 64 65 // SetCertificateAuthorityData sets field value 66 func (o *ClusterKubeConfigRead) SetCertificateAuthorityData(v string) { 67 o.CertificateAuthorityData = v 68 } 69 70 // GetServer returns the Server field value 71 func (o *ClusterKubeConfigRead) GetServer() string { 72 if o == nil { 73 var ret string 74 return ret 75 } 76 77 return o.Server 78 } 79 80 // GetServerOk returns a tuple with the Server field value 81 // and a boolean to check if the value has been set. 82 func (o *ClusterKubeConfigRead) GetServerOk() (*string, bool) { 83 if o == nil { 84 return nil, false 85 } 86 return &o.Server, true 87 } 88 89 // SetServer sets field value 90 func (o *ClusterKubeConfigRead) SetServer(v string) { 91 o.Server = v 92 } 93 94 func (o ClusterKubeConfigRead) MarshalJSON() ([]byte, error) { 95 toSerialize, err := o.ToMap() 96 if err != nil { 97 return []byte{}, err 98 } 99 return json.Marshal(toSerialize) 100 } 101 102 func (o ClusterKubeConfigRead) ToMap() (map[string]interface{}, error) { 103 toSerialize := map[string]interface{}{} 104 toSerialize["certificate-authority-data"] = o.CertificateAuthorityData 105 toSerialize["server"] = o.Server 106 return toSerialize, nil 107 } 108 109 type NullableClusterKubeConfigRead struct { 110 value *ClusterKubeConfigRead 111 isSet bool 112 } 113 114 func (v NullableClusterKubeConfigRead) Get() *ClusterKubeConfigRead { 115 return v.value 116 } 117 118 func (v *NullableClusterKubeConfigRead) Set(val *ClusterKubeConfigRead) { 119 v.value = val 120 v.isSet = true 121 } 122 123 func (v NullableClusterKubeConfigRead) IsSet() bool { 124 return v.isSet 125 } 126 127 func (v *NullableClusterKubeConfigRead) Unset() { 128 v.value = nil 129 v.isSet = false 130 } 131 132 func NewNullableClusterKubeConfigRead(val *ClusterKubeConfigRead) *NullableClusterKubeConfigRead { 133 return &NullableClusterKubeConfigRead{value: val, isSet: true} 134 } 135 136 func (v NullableClusterKubeConfigRead) MarshalJSON() ([]byte, error) { 137 return json.Marshal(v.value) 138 } 139 140 func (v *NullableClusterKubeConfigRead) UnmarshalJSON(src []byte) error { 141 v.isSet = true 142 return json.Unmarshal(src, &v.value) 143 }