bunnyshell.com/sdk@v0.16.0/model_environment_edit_components_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 EnvironmentEditComponentsAction type satisfies the MappedNullable interface at compile time 19 var _ MappedNullable = &EnvironmentEditComponentsAction{} 20 21 // EnvironmentEditComponentsAction An environment holds a collection of buildable and deployable components. 22 type EnvironmentEditComponentsAction struct { 23 Filter EnvironmentEditComponentsActionFilter `json:"filter"` 24 Target GitInfo `json:"target"` 25 } 26 27 // NewEnvironmentEditComponentsAction instantiates a new EnvironmentEditComponentsAction 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 NewEnvironmentEditComponentsAction(filter EnvironmentEditComponentsActionFilter, target GitInfo) *EnvironmentEditComponentsAction { 32 this := EnvironmentEditComponentsAction{} 33 this.Filter = filter 34 this.Target = target 35 return &this 36 } 37 38 // NewEnvironmentEditComponentsActionWithDefaults instantiates a new EnvironmentEditComponentsAction 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 NewEnvironmentEditComponentsActionWithDefaults() *EnvironmentEditComponentsAction { 42 this := EnvironmentEditComponentsAction{} 43 return &this 44 } 45 46 // GetFilter returns the Filter field value 47 func (o *EnvironmentEditComponentsAction) GetFilter() EnvironmentEditComponentsActionFilter { 48 if o == nil { 49 var ret EnvironmentEditComponentsActionFilter 50 return ret 51 } 52 53 return o.Filter 54 } 55 56 // GetFilterOk returns a tuple with the Filter field value 57 // and a boolean to check if the value has been set. 58 func (o *EnvironmentEditComponentsAction) GetFilterOk() (*EnvironmentEditComponentsActionFilter, bool) { 59 if o == nil { 60 return nil, false 61 } 62 return &o.Filter, true 63 } 64 65 // SetFilter sets field value 66 func (o *EnvironmentEditComponentsAction) SetFilter(v EnvironmentEditComponentsActionFilter) { 67 o.Filter = v 68 } 69 70 // GetTarget returns the Target field value 71 func (o *EnvironmentEditComponentsAction) GetTarget() GitInfo { 72 if o == nil { 73 var ret GitInfo 74 return ret 75 } 76 77 return o.Target 78 } 79 80 // GetTargetOk returns a tuple with the Target field value 81 // and a boolean to check if the value has been set. 82 func (o *EnvironmentEditComponentsAction) GetTargetOk() (*GitInfo, bool) { 83 if o == nil { 84 return nil, false 85 } 86 return &o.Target, true 87 } 88 89 // SetTarget sets field value 90 func (o *EnvironmentEditComponentsAction) SetTarget(v GitInfo) { 91 o.Target = v 92 } 93 94 func (o EnvironmentEditComponentsAction) 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 EnvironmentEditComponentsAction) ToMap() (map[string]interface{}, error) { 103 toSerialize := map[string]interface{}{} 104 toSerialize["filter"] = o.Filter 105 toSerialize["target"] = o.Target 106 return toSerialize, nil 107 } 108 109 type NullableEnvironmentEditComponentsAction struct { 110 value *EnvironmentEditComponentsAction 111 isSet bool 112 } 113 114 func (v NullableEnvironmentEditComponentsAction) Get() *EnvironmentEditComponentsAction { 115 return v.value 116 } 117 118 func (v *NullableEnvironmentEditComponentsAction) Set(val *EnvironmentEditComponentsAction) { 119 v.value = val 120 v.isSet = true 121 } 122 123 func (v NullableEnvironmentEditComponentsAction) IsSet() bool { 124 return v.isSet 125 } 126 127 func (v *NullableEnvironmentEditComponentsAction) Unset() { 128 v.value = nil 129 v.isSet = false 130 } 131 132 func NewNullableEnvironmentEditComponentsAction(val *EnvironmentEditComponentsAction) *NullableEnvironmentEditComponentsAction { 133 return &NullableEnvironmentEditComponentsAction{value: val, isSet: true} 134 } 135 136 func (v NullableEnvironmentEditComponentsAction) MarshalJSON() ([]byte, error) { 137 return json.Marshal(v.value) 138 } 139 140 func (v *NullableEnvironmentEditComponentsAction) UnmarshalJSON(src []byte) error { 141 v.isSet = true 142 return json.Unmarshal(src, &v.value) 143 }