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