bunnyshell.com/sdk@v0.16.0/model_environment_edit_settings.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 EnvironmentEditSettings type satisfies the MappedNullable interface at compile time
    19  var _ MappedNullable = &EnvironmentEditSettings{}
    20  
    21  // EnvironmentEditSettings An environment holds a collection of buildable and deployable components.
    22  type EnvironmentEditSettings struct {
    23  	Name                     NullableString               `json:"name,omitempty"`
    24  	RemoteDevelopmentAllowed NullableBool                 `json:"remoteDevelopmentAllowed,omitempty"`
    25  	AutoUpdate               NullableBool                 `json:"autoUpdate,omitempty"`
    26  	KubernetesIntegration    NullableString               `json:"kubernetesIntegration,omitempty"`
    27  	Edit                     *EnvironmentEditSettingsEdit `json:"edit,omitempty"`
    28  	Labels                   NullableEdit                 `json:"labels,omitempty"`
    29  }
    30  
    31  // NewEnvironmentEditSettings instantiates a new EnvironmentEditSettings object
    32  // This constructor will assign default values to properties that have it defined,
    33  // and makes sure properties required by API are set, but the set of arguments
    34  // will change when the set of required properties is changed
    35  func NewEnvironmentEditSettings() *EnvironmentEditSettings {
    36  	this := EnvironmentEditSettings{}
    37  	return &this
    38  }
    39  
    40  // NewEnvironmentEditSettingsWithDefaults instantiates a new EnvironmentEditSettings object
    41  // This constructor will only assign default values to properties that have it defined,
    42  // but it doesn't guarantee that properties required by API are set
    43  func NewEnvironmentEditSettingsWithDefaults() *EnvironmentEditSettings {
    44  	this := EnvironmentEditSettings{}
    45  	return &this
    46  }
    47  
    48  // GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null).
    49  func (o *EnvironmentEditSettings) GetName() string {
    50  	if o == nil || IsNil(o.Name.Get()) {
    51  		var ret string
    52  		return ret
    53  	}
    54  	return *o.Name.Get()
    55  }
    56  
    57  // GetNameOk returns a tuple with the Name field value if set, nil otherwise
    58  // and a boolean to check if the value has been set.
    59  // NOTE: If the value is an explicit nil, `nil, true` will be returned
    60  func (o *EnvironmentEditSettings) GetNameOk() (*string, bool) {
    61  	if o == nil {
    62  		return nil, false
    63  	}
    64  	return o.Name.Get(), o.Name.IsSet()
    65  }
    66  
    67  // HasName returns a boolean if a field has been set.
    68  func (o *EnvironmentEditSettings) HasName() bool {
    69  	if o != nil && o.Name.IsSet() {
    70  		return true
    71  	}
    72  
    73  	return false
    74  }
    75  
    76  // SetName gets a reference to the given NullableString and assigns it to the Name field.
    77  func (o *EnvironmentEditSettings) SetName(v string) {
    78  	o.Name.Set(&v)
    79  }
    80  
    81  // SetNameNil sets the value for Name to be an explicit nil
    82  func (o *EnvironmentEditSettings) SetNameNil() {
    83  	o.Name.Set(nil)
    84  }
    85  
    86  // UnsetName ensures that no value is present for Name, not even an explicit nil
    87  func (o *EnvironmentEditSettings) UnsetName() {
    88  	o.Name.Unset()
    89  }
    90  
    91  // GetRemoteDevelopmentAllowed returns the RemoteDevelopmentAllowed field value if set, zero value otherwise (both if not set or set to explicit null).
    92  func (o *EnvironmentEditSettings) GetRemoteDevelopmentAllowed() bool {
    93  	if o == nil || IsNil(o.RemoteDevelopmentAllowed.Get()) {
    94  		var ret bool
    95  		return ret
    96  	}
    97  	return *o.RemoteDevelopmentAllowed.Get()
    98  }
    99  
   100  // GetRemoteDevelopmentAllowedOk returns a tuple with the RemoteDevelopmentAllowed field value if set, nil otherwise
   101  // and a boolean to check if the value has been set.
   102  // NOTE: If the value is an explicit nil, `nil, true` will be returned
   103  func (o *EnvironmentEditSettings) GetRemoteDevelopmentAllowedOk() (*bool, bool) {
   104  	if o == nil {
   105  		return nil, false
   106  	}
   107  	return o.RemoteDevelopmentAllowed.Get(), o.RemoteDevelopmentAllowed.IsSet()
   108  }
   109  
   110  // HasRemoteDevelopmentAllowed returns a boolean if a field has been set.
   111  func (o *EnvironmentEditSettings) HasRemoteDevelopmentAllowed() bool {
   112  	if o != nil && o.RemoteDevelopmentAllowed.IsSet() {
   113  		return true
   114  	}
   115  
   116  	return false
   117  }
   118  
   119  // SetRemoteDevelopmentAllowed gets a reference to the given NullableBool and assigns it to the RemoteDevelopmentAllowed field.
   120  func (o *EnvironmentEditSettings) SetRemoteDevelopmentAllowed(v bool) {
   121  	o.RemoteDevelopmentAllowed.Set(&v)
   122  }
   123  
   124  // SetRemoteDevelopmentAllowedNil sets the value for RemoteDevelopmentAllowed to be an explicit nil
   125  func (o *EnvironmentEditSettings) SetRemoteDevelopmentAllowedNil() {
   126  	o.RemoteDevelopmentAllowed.Set(nil)
   127  }
   128  
   129  // UnsetRemoteDevelopmentAllowed ensures that no value is present for RemoteDevelopmentAllowed, not even an explicit nil
   130  func (o *EnvironmentEditSettings) UnsetRemoteDevelopmentAllowed() {
   131  	o.RemoteDevelopmentAllowed.Unset()
   132  }
   133  
   134  // GetAutoUpdate returns the AutoUpdate field value if set, zero value otherwise (both if not set or set to explicit null).
   135  func (o *EnvironmentEditSettings) GetAutoUpdate() bool {
   136  	if o == nil || IsNil(o.AutoUpdate.Get()) {
   137  		var ret bool
   138  		return ret
   139  	}
   140  	return *o.AutoUpdate.Get()
   141  }
   142  
   143  // GetAutoUpdateOk returns a tuple with the AutoUpdate field value if set, nil otherwise
   144  // and a boolean to check if the value has been set.
   145  // NOTE: If the value is an explicit nil, `nil, true` will be returned
   146  func (o *EnvironmentEditSettings) GetAutoUpdateOk() (*bool, bool) {
   147  	if o == nil {
   148  		return nil, false
   149  	}
   150  	return o.AutoUpdate.Get(), o.AutoUpdate.IsSet()
   151  }
   152  
   153  // HasAutoUpdate returns a boolean if a field has been set.
   154  func (o *EnvironmentEditSettings) HasAutoUpdate() bool {
   155  	if o != nil && o.AutoUpdate.IsSet() {
   156  		return true
   157  	}
   158  
   159  	return false
   160  }
   161  
   162  // SetAutoUpdate gets a reference to the given NullableBool and assigns it to the AutoUpdate field.
   163  func (o *EnvironmentEditSettings) SetAutoUpdate(v bool) {
   164  	o.AutoUpdate.Set(&v)
   165  }
   166  
   167  // SetAutoUpdateNil sets the value for AutoUpdate to be an explicit nil
   168  func (o *EnvironmentEditSettings) SetAutoUpdateNil() {
   169  	o.AutoUpdate.Set(nil)
   170  }
   171  
   172  // UnsetAutoUpdate ensures that no value is present for AutoUpdate, not even an explicit nil
   173  func (o *EnvironmentEditSettings) UnsetAutoUpdate() {
   174  	o.AutoUpdate.Unset()
   175  }
   176  
   177  // GetKubernetesIntegration returns the KubernetesIntegration field value if set, zero value otherwise (both if not set or set to explicit null).
   178  func (o *EnvironmentEditSettings) GetKubernetesIntegration() string {
   179  	if o == nil || IsNil(o.KubernetesIntegration.Get()) {
   180  		var ret string
   181  		return ret
   182  	}
   183  	return *o.KubernetesIntegration.Get()
   184  }
   185  
   186  // GetKubernetesIntegrationOk returns a tuple with the KubernetesIntegration field value if set, nil otherwise
   187  // and a boolean to check if the value has been set.
   188  // NOTE: If the value is an explicit nil, `nil, true` will be returned
   189  func (o *EnvironmentEditSettings) GetKubernetesIntegrationOk() (*string, bool) {
   190  	if o == nil {
   191  		return nil, false
   192  	}
   193  	return o.KubernetesIntegration.Get(), o.KubernetesIntegration.IsSet()
   194  }
   195  
   196  // HasKubernetesIntegration returns a boolean if a field has been set.
   197  func (o *EnvironmentEditSettings) HasKubernetesIntegration() bool {
   198  	if o != nil && o.KubernetesIntegration.IsSet() {
   199  		return true
   200  	}
   201  
   202  	return false
   203  }
   204  
   205  // SetKubernetesIntegration gets a reference to the given NullableString and assigns it to the KubernetesIntegration field.
   206  func (o *EnvironmentEditSettings) SetKubernetesIntegration(v string) {
   207  	o.KubernetesIntegration.Set(&v)
   208  }
   209  
   210  // SetKubernetesIntegrationNil sets the value for KubernetesIntegration to be an explicit nil
   211  func (o *EnvironmentEditSettings) SetKubernetesIntegrationNil() {
   212  	o.KubernetesIntegration.Set(nil)
   213  }
   214  
   215  // UnsetKubernetesIntegration ensures that no value is present for KubernetesIntegration, not even an explicit nil
   216  func (o *EnvironmentEditSettings) UnsetKubernetesIntegration() {
   217  	o.KubernetesIntegration.Unset()
   218  }
   219  
   220  // GetEdit returns the Edit field value if set, zero value otherwise.
   221  func (o *EnvironmentEditSettings) GetEdit() EnvironmentEditSettingsEdit {
   222  	if o == nil || IsNil(o.Edit) {
   223  		var ret EnvironmentEditSettingsEdit
   224  		return ret
   225  	}
   226  	return *o.Edit
   227  }
   228  
   229  // GetEditOk returns a tuple with the Edit field value if set, nil otherwise
   230  // and a boolean to check if the value has been set.
   231  func (o *EnvironmentEditSettings) GetEditOk() (*EnvironmentEditSettingsEdit, bool) {
   232  	if o == nil || IsNil(o.Edit) {
   233  		return nil, false
   234  	}
   235  	return o.Edit, true
   236  }
   237  
   238  // HasEdit returns a boolean if a field has been set.
   239  func (o *EnvironmentEditSettings) HasEdit() bool {
   240  	if o != nil && !IsNil(o.Edit) {
   241  		return true
   242  	}
   243  
   244  	return false
   245  }
   246  
   247  // SetEdit gets a reference to the given EnvironmentEditSettingsEdit and assigns it to the Edit field.
   248  func (o *EnvironmentEditSettings) SetEdit(v EnvironmentEditSettingsEdit) {
   249  	o.Edit = &v
   250  }
   251  
   252  // GetLabels returns the Labels field value if set, zero value otherwise (both if not set or set to explicit null).
   253  func (o *EnvironmentEditSettings) GetLabels() Edit {
   254  	if o == nil || IsNil(o.Labels.Get()) {
   255  		var ret Edit
   256  		return ret
   257  	}
   258  	return *o.Labels.Get()
   259  }
   260  
   261  // GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
   262  // and a boolean to check if the value has been set.
   263  // NOTE: If the value is an explicit nil, `nil, true` will be returned
   264  func (o *EnvironmentEditSettings) GetLabelsOk() (*Edit, bool) {
   265  	if o == nil {
   266  		return nil, false
   267  	}
   268  	return o.Labels.Get(), o.Labels.IsSet()
   269  }
   270  
   271  // HasLabels returns a boolean if a field has been set.
   272  func (o *EnvironmentEditSettings) HasLabels() bool {
   273  	if o != nil && o.Labels.IsSet() {
   274  		return true
   275  	}
   276  
   277  	return false
   278  }
   279  
   280  // SetLabels gets a reference to the given NullableEdit and assigns it to the Labels field.
   281  func (o *EnvironmentEditSettings) SetLabels(v Edit) {
   282  	o.Labels.Set(&v)
   283  }
   284  
   285  // SetLabelsNil sets the value for Labels to be an explicit nil
   286  func (o *EnvironmentEditSettings) SetLabelsNil() {
   287  	o.Labels.Set(nil)
   288  }
   289  
   290  // UnsetLabels ensures that no value is present for Labels, not even an explicit nil
   291  func (o *EnvironmentEditSettings) UnsetLabels() {
   292  	o.Labels.Unset()
   293  }
   294  
   295  func (o EnvironmentEditSettings) MarshalJSON() ([]byte, error) {
   296  	toSerialize, err := o.ToMap()
   297  	if err != nil {
   298  		return []byte{}, err
   299  	}
   300  	return json.Marshal(toSerialize)
   301  }
   302  
   303  func (o EnvironmentEditSettings) ToMap() (map[string]interface{}, error) {
   304  	toSerialize := map[string]interface{}{}
   305  	if o.Name.IsSet() {
   306  		toSerialize["name"] = o.Name.Get()
   307  	}
   308  	if o.RemoteDevelopmentAllowed.IsSet() {
   309  		toSerialize["remoteDevelopmentAllowed"] = o.RemoteDevelopmentAllowed.Get()
   310  	}
   311  	if o.AutoUpdate.IsSet() {
   312  		toSerialize["autoUpdate"] = o.AutoUpdate.Get()
   313  	}
   314  	if o.KubernetesIntegration.IsSet() {
   315  		toSerialize["kubernetesIntegration"] = o.KubernetesIntegration.Get()
   316  	}
   317  	if !IsNil(o.Edit) {
   318  		toSerialize["edit"] = o.Edit
   319  	}
   320  	if o.Labels.IsSet() {
   321  		toSerialize["labels"] = o.Labels.Get()
   322  	}
   323  	return toSerialize, nil
   324  }
   325  
   326  type NullableEnvironmentEditSettings struct {
   327  	value *EnvironmentEditSettings
   328  	isSet bool
   329  }
   330  
   331  func (v NullableEnvironmentEditSettings) Get() *EnvironmentEditSettings {
   332  	return v.value
   333  }
   334  
   335  func (v *NullableEnvironmentEditSettings) Set(val *EnvironmentEditSettings) {
   336  	v.value = val
   337  	v.isSet = true
   338  }
   339  
   340  func (v NullableEnvironmentEditSettings) IsSet() bool {
   341  	return v.isSet
   342  }
   343  
   344  func (v *NullableEnvironmentEditSettings) Unset() {
   345  	v.value = nil
   346  	v.isSet = false
   347  }
   348  
   349  func NewNullableEnvironmentEditSettings(val *EnvironmentEditSettings) *NullableEnvironmentEditSettings {
   350  	return &NullableEnvironmentEditSettings{value: val, isSet: true}
   351  }
   352  
   353  func (v NullableEnvironmentEditSettings) MarshalJSON() ([]byte, error) {
   354  	return json.Marshal(v.value)
   355  }
   356  
   357  func (v *NullableEnvironmentEditSettings) UnmarshalJSON(src []byte) error {
   358  	v.isSet = true
   359  	return json.Unmarshal(src, &v.value)
   360  }