bunnyshell.com/sdk@v0.16.0/model_environment_partial_deploy_action.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 EnvironmentPartialDeployAction type satisfies the MappedNullable interface at compile time
    19  var _ MappedNullable = &EnvironmentPartialDeployAction{}
    20  
    21  // EnvironmentPartialDeployAction An environment holds a collection of buildable and deployable components.
    22  type EnvironmentPartialDeployAction struct {
    23  	IncludedDependencies *string  `json:"includedDependencies,omitempty"`
    24  	IsPartial            *bool    `json:"isPartial,omitempty"`
    25  	Components           []string `json:"components,omitempty"`
    26  }
    27  
    28  // NewEnvironmentPartialDeployAction instantiates a new EnvironmentPartialDeployAction 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 NewEnvironmentPartialDeployAction() *EnvironmentPartialDeployAction {
    33  	this := EnvironmentPartialDeployAction{}
    34  	var includedDependencies string = "none"
    35  	this.IncludedDependencies = &includedDependencies
    36  	return &this
    37  }
    38  
    39  // NewEnvironmentPartialDeployActionWithDefaults instantiates a new EnvironmentPartialDeployAction object
    40  // This constructor will only assign default values to properties that have it defined,
    41  // but it doesn't guarantee that properties required by API are set
    42  func NewEnvironmentPartialDeployActionWithDefaults() *EnvironmentPartialDeployAction {
    43  	this := EnvironmentPartialDeployAction{}
    44  	var includedDependencies string = "none"
    45  	this.IncludedDependencies = &includedDependencies
    46  	return &this
    47  }
    48  
    49  // GetIncludedDependencies returns the IncludedDependencies field value if set, zero value otherwise.
    50  func (o *EnvironmentPartialDeployAction) GetIncludedDependencies() string {
    51  	if o == nil || IsNil(o.IncludedDependencies) {
    52  		var ret string
    53  		return ret
    54  	}
    55  	return *o.IncludedDependencies
    56  }
    57  
    58  // GetIncludedDependenciesOk returns a tuple with the IncludedDependencies field value if set, nil otherwise
    59  // and a boolean to check if the value has been set.
    60  func (o *EnvironmentPartialDeployAction) GetIncludedDependenciesOk() (*string, bool) {
    61  	if o == nil || IsNil(o.IncludedDependencies) {
    62  		return nil, false
    63  	}
    64  	return o.IncludedDependencies, true
    65  }
    66  
    67  // HasIncludedDependencies returns a boolean if a field has been set.
    68  func (o *EnvironmentPartialDeployAction) HasIncludedDependencies() bool {
    69  	if o != nil && !IsNil(o.IncludedDependencies) {
    70  		return true
    71  	}
    72  
    73  	return false
    74  }
    75  
    76  // SetIncludedDependencies gets a reference to the given string and assigns it to the IncludedDependencies field.
    77  func (o *EnvironmentPartialDeployAction) SetIncludedDependencies(v string) {
    78  	o.IncludedDependencies = &v
    79  }
    80  
    81  // GetIsPartial returns the IsPartial field value if set, zero value otherwise.
    82  func (o *EnvironmentPartialDeployAction) GetIsPartial() bool {
    83  	if o == nil || IsNil(o.IsPartial) {
    84  		var ret bool
    85  		return ret
    86  	}
    87  	return *o.IsPartial
    88  }
    89  
    90  // GetIsPartialOk returns a tuple with the IsPartial field value if set, nil otherwise
    91  // and a boolean to check if the value has been set.
    92  func (o *EnvironmentPartialDeployAction) GetIsPartialOk() (*bool, bool) {
    93  	if o == nil || IsNil(o.IsPartial) {
    94  		return nil, false
    95  	}
    96  	return o.IsPartial, true
    97  }
    98  
    99  // HasIsPartial returns a boolean if a field has been set.
   100  func (o *EnvironmentPartialDeployAction) HasIsPartial() bool {
   101  	if o != nil && !IsNil(o.IsPartial) {
   102  		return true
   103  	}
   104  
   105  	return false
   106  }
   107  
   108  // SetIsPartial gets a reference to the given bool and assigns it to the IsPartial field.
   109  func (o *EnvironmentPartialDeployAction) SetIsPartial(v bool) {
   110  	o.IsPartial = &v
   111  }
   112  
   113  // GetComponents returns the Components field value if set, zero value otherwise.
   114  func (o *EnvironmentPartialDeployAction) GetComponents() []string {
   115  	if o == nil || IsNil(o.Components) {
   116  		var ret []string
   117  		return ret
   118  	}
   119  	return o.Components
   120  }
   121  
   122  // GetComponentsOk returns a tuple with the Components field value if set, nil otherwise
   123  // and a boolean to check if the value has been set.
   124  func (o *EnvironmentPartialDeployAction) GetComponentsOk() ([]string, bool) {
   125  	if o == nil || IsNil(o.Components) {
   126  		return nil, false
   127  	}
   128  	return o.Components, true
   129  }
   130  
   131  // HasComponents returns a boolean if a field has been set.
   132  func (o *EnvironmentPartialDeployAction) HasComponents() bool {
   133  	if o != nil && !IsNil(o.Components) {
   134  		return true
   135  	}
   136  
   137  	return false
   138  }
   139  
   140  // SetComponents gets a reference to the given []string and assigns it to the Components field.
   141  func (o *EnvironmentPartialDeployAction) SetComponents(v []string) {
   142  	o.Components = v
   143  }
   144  
   145  func (o EnvironmentPartialDeployAction) MarshalJSON() ([]byte, error) {
   146  	toSerialize, err := o.ToMap()
   147  	if err != nil {
   148  		return []byte{}, err
   149  	}
   150  	return json.Marshal(toSerialize)
   151  }
   152  
   153  func (o EnvironmentPartialDeployAction) ToMap() (map[string]interface{}, error) {
   154  	toSerialize := map[string]interface{}{}
   155  	if !IsNil(o.IncludedDependencies) {
   156  		toSerialize["includedDependencies"] = o.IncludedDependencies
   157  	}
   158  	if !IsNil(o.IsPartial) {
   159  		toSerialize["isPartial"] = o.IsPartial
   160  	}
   161  	if !IsNil(o.Components) {
   162  		toSerialize["components"] = o.Components
   163  	}
   164  	return toSerialize, nil
   165  }
   166  
   167  type NullableEnvironmentPartialDeployAction struct {
   168  	value *EnvironmentPartialDeployAction
   169  	isSet bool
   170  }
   171  
   172  func (v NullableEnvironmentPartialDeployAction) Get() *EnvironmentPartialDeployAction {
   173  	return v.value
   174  }
   175  
   176  func (v *NullableEnvironmentPartialDeployAction) Set(val *EnvironmentPartialDeployAction) {
   177  	v.value = val
   178  	v.isSet = true
   179  }
   180  
   181  func (v NullableEnvironmentPartialDeployAction) IsSet() bool {
   182  	return v.isSet
   183  }
   184  
   185  func (v *NullableEnvironmentPartialDeployAction) Unset() {
   186  	v.value = nil
   187  	v.isSet = false
   188  }
   189  
   190  func NewNullableEnvironmentPartialDeployAction(val *EnvironmentPartialDeployAction) *NullableEnvironmentPartialDeployAction {
   191  	return &NullableEnvironmentPartialDeployAction{value: val, isSet: true}
   192  }
   193  
   194  func (v NullableEnvironmentPartialDeployAction) MarshalJSON() ([]byte, error) {
   195  	return json.Marshal(v.value)
   196  }
   197  
   198  func (v *NullableEnvironmentPartialDeployAction) UnmarshalJSON(src []byte) error {
   199  	v.isSet = true
   200  	return json.Unmarshal(src, &v.value)
   201  }