bunnyshell.com/sdk@v0.16.0/model_extended_resource_config_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 ExtendedResourceConfigItem type satisfies the MappedNullable interface at compile time 19 var _ MappedNullable = &ExtendedResourceConfigItem{} 20 21 // ExtendedResourceConfigItem struct for ExtendedResourceConfigItem 22 type ExtendedResourceConfigItem struct { 23 Extended *bool `json:"extended,omitempty"` 24 // The resource namespace. 25 Namespace *string `json:"namespace,omitempty"` 26 // The resource kind. 27 Kind *string `json:"kind,omitempty"` 28 // The resource name. 29 Name *string `json:"name,omitempty"` 30 // A list of container configs. 31 Containers *map[string]ContainerConfigItem `json:"containers,omitempty"` 32 } 33 34 // NewExtendedResourceConfigItem instantiates a new ExtendedResourceConfigItem object 35 // This constructor will assign default values to properties that have it defined, 36 // and makes sure properties required by API are set, but the set of arguments 37 // will change when the set of required properties is changed 38 func NewExtendedResourceConfigItem() *ExtendedResourceConfigItem { 39 this := ExtendedResourceConfigItem{} 40 return &this 41 } 42 43 // NewExtendedResourceConfigItemWithDefaults instantiates a new ExtendedResourceConfigItem object 44 // This constructor will only assign default values to properties that have it defined, 45 // but it doesn't guarantee that properties required by API are set 46 func NewExtendedResourceConfigItemWithDefaults() *ExtendedResourceConfigItem { 47 this := ExtendedResourceConfigItem{} 48 return &this 49 } 50 51 // GetExtended returns the Extended field value if set, zero value otherwise. 52 func (o *ExtendedResourceConfigItem) GetExtended() bool { 53 if o == nil || IsNil(o.Extended) { 54 var ret bool 55 return ret 56 } 57 return *o.Extended 58 } 59 60 // GetExtendedOk returns a tuple with the Extended field value if set, nil otherwise 61 // and a boolean to check if the value has been set. 62 func (o *ExtendedResourceConfigItem) GetExtendedOk() (*bool, bool) { 63 if o == nil || IsNil(o.Extended) { 64 return nil, false 65 } 66 return o.Extended, true 67 } 68 69 // HasExtended returns a boolean if a field has been set. 70 func (o *ExtendedResourceConfigItem) HasExtended() bool { 71 if o != nil && !IsNil(o.Extended) { 72 return true 73 } 74 75 return false 76 } 77 78 // SetExtended gets a reference to the given bool and assigns it to the Extended field. 79 func (o *ExtendedResourceConfigItem) SetExtended(v bool) { 80 o.Extended = &v 81 } 82 83 // GetNamespace returns the Namespace field value if set, zero value otherwise. 84 func (o *ExtendedResourceConfigItem) GetNamespace() string { 85 if o == nil || IsNil(o.Namespace) { 86 var ret string 87 return ret 88 } 89 return *o.Namespace 90 } 91 92 // GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise 93 // and a boolean to check if the value has been set. 94 func (o *ExtendedResourceConfigItem) GetNamespaceOk() (*string, bool) { 95 if o == nil || IsNil(o.Namespace) { 96 return nil, false 97 } 98 return o.Namespace, true 99 } 100 101 // HasNamespace returns a boolean if a field has been set. 102 func (o *ExtendedResourceConfigItem) HasNamespace() bool { 103 if o != nil && !IsNil(o.Namespace) { 104 return true 105 } 106 107 return false 108 } 109 110 // SetNamespace gets a reference to the given string and assigns it to the Namespace field. 111 func (o *ExtendedResourceConfigItem) SetNamespace(v string) { 112 o.Namespace = &v 113 } 114 115 // GetKind returns the Kind field value if set, zero value otherwise. 116 func (o *ExtendedResourceConfigItem) GetKind() string { 117 if o == nil || IsNil(o.Kind) { 118 var ret string 119 return ret 120 } 121 return *o.Kind 122 } 123 124 // GetKindOk returns a tuple with the Kind field value if set, nil otherwise 125 // and a boolean to check if the value has been set. 126 func (o *ExtendedResourceConfigItem) GetKindOk() (*string, bool) { 127 if o == nil || IsNil(o.Kind) { 128 return nil, false 129 } 130 return o.Kind, true 131 } 132 133 // HasKind returns a boolean if a field has been set. 134 func (o *ExtendedResourceConfigItem) HasKind() bool { 135 if o != nil && !IsNil(o.Kind) { 136 return true 137 } 138 139 return false 140 } 141 142 // SetKind gets a reference to the given string and assigns it to the Kind field. 143 func (o *ExtendedResourceConfigItem) SetKind(v string) { 144 o.Kind = &v 145 } 146 147 // GetName returns the Name field value if set, zero value otherwise. 148 func (o *ExtendedResourceConfigItem) GetName() string { 149 if o == nil || IsNil(o.Name) { 150 var ret string 151 return ret 152 } 153 return *o.Name 154 } 155 156 // GetNameOk returns a tuple with the Name field value if set, nil otherwise 157 // and a boolean to check if the value has been set. 158 func (o *ExtendedResourceConfigItem) GetNameOk() (*string, bool) { 159 if o == nil || IsNil(o.Name) { 160 return nil, false 161 } 162 return o.Name, true 163 } 164 165 // HasName returns a boolean if a field has been set. 166 func (o *ExtendedResourceConfigItem) HasName() bool { 167 if o != nil && !IsNil(o.Name) { 168 return true 169 } 170 171 return false 172 } 173 174 // SetName gets a reference to the given string and assigns it to the Name field. 175 func (o *ExtendedResourceConfigItem) SetName(v string) { 176 o.Name = &v 177 } 178 179 // GetContainers returns the Containers field value if set, zero value otherwise. 180 func (o *ExtendedResourceConfigItem) GetContainers() map[string]ContainerConfigItem { 181 if o == nil || IsNil(o.Containers) { 182 var ret map[string]ContainerConfigItem 183 return ret 184 } 185 return *o.Containers 186 } 187 188 // GetContainersOk returns a tuple with the Containers field value if set, nil otherwise 189 // and a boolean to check if the value has been set. 190 func (o *ExtendedResourceConfigItem) GetContainersOk() (*map[string]ContainerConfigItem, bool) { 191 if o == nil || IsNil(o.Containers) { 192 return nil, false 193 } 194 return o.Containers, true 195 } 196 197 // HasContainers returns a boolean if a field has been set. 198 func (o *ExtendedResourceConfigItem) HasContainers() bool { 199 if o != nil && !IsNil(o.Containers) { 200 return true 201 } 202 203 return false 204 } 205 206 // SetContainers gets a reference to the given map[string]ContainerConfigItem and assigns it to the Containers field. 207 func (o *ExtendedResourceConfigItem) SetContainers(v map[string]ContainerConfigItem) { 208 o.Containers = &v 209 } 210 211 func (o ExtendedResourceConfigItem) MarshalJSON() ([]byte, error) { 212 toSerialize, err := o.ToMap() 213 if err != nil { 214 return []byte{}, err 215 } 216 return json.Marshal(toSerialize) 217 } 218 219 func (o ExtendedResourceConfigItem) ToMap() (map[string]interface{}, error) { 220 toSerialize := map[string]interface{}{} 221 if !IsNil(o.Extended) { 222 toSerialize["extended"] = o.Extended 223 } 224 if !IsNil(o.Namespace) { 225 toSerialize["namespace"] = o.Namespace 226 } 227 if !IsNil(o.Kind) { 228 toSerialize["kind"] = o.Kind 229 } 230 if !IsNil(o.Name) { 231 toSerialize["name"] = o.Name 232 } 233 if !IsNil(o.Containers) { 234 toSerialize["containers"] = o.Containers 235 } 236 return toSerialize, nil 237 } 238 239 type NullableExtendedResourceConfigItem struct { 240 value *ExtendedResourceConfigItem 241 isSet bool 242 } 243 244 func (v NullableExtendedResourceConfigItem) Get() *ExtendedResourceConfigItem { 245 return v.value 246 } 247 248 func (v *NullableExtendedResourceConfigItem) Set(val *ExtendedResourceConfigItem) { 249 v.value = val 250 v.isSet = true 251 } 252 253 func (v NullableExtendedResourceConfigItem) IsSet() bool { 254 return v.isSet 255 } 256 257 func (v *NullableExtendedResourceConfigItem) Unset() { 258 v.value = nil 259 v.isSet = false 260 } 261 262 func NewNullableExtendedResourceConfigItem(val *ExtendedResourceConfigItem) *NullableExtendedResourceConfigItem { 263 return &NullableExtendedResourceConfigItem{value: val, isSet: true} 264 } 265 266 func (v NullableExtendedResourceConfigItem) MarshalJSON() ([]byte, error) { 267 return json.Marshal(v.value) 268 } 269 270 func (v *NullableExtendedResourceConfigItem) UnmarshalJSON(src []byte) error { 271 v.isSet = true 272 return json.Unmarshal(src, &v.value) 273 }