bunnyshell.com/sdk@v0.16.0/model_secret_decrypt_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 SecretDecryptAction type satisfies the MappedNullable interface at compile time 19 var _ MappedNullable = &SecretDecryptAction{} 20 21 // SecretDecryptAction A secret is used to encrypt plain texts and decrypt cipher texts. 22 type SecretDecryptAction struct { 23 Expression string `json:"expression"` 24 Organization string `json:"organization"` 25 } 26 27 // NewSecretDecryptAction instantiates a new SecretDecryptAction 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 NewSecretDecryptAction(expression string, organization string) *SecretDecryptAction { 32 this := SecretDecryptAction{} 33 this.Expression = expression 34 this.Organization = organization 35 return &this 36 } 37 38 // NewSecretDecryptActionWithDefaults instantiates a new SecretDecryptAction 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 NewSecretDecryptActionWithDefaults() *SecretDecryptAction { 42 this := SecretDecryptAction{} 43 return &this 44 } 45 46 // GetExpression returns the Expression field value 47 func (o *SecretDecryptAction) GetExpression() string { 48 if o == nil { 49 var ret string 50 return ret 51 } 52 53 return o.Expression 54 } 55 56 // GetExpressionOk returns a tuple with the Expression field value 57 // and a boolean to check if the value has been set. 58 func (o *SecretDecryptAction) GetExpressionOk() (*string, bool) { 59 if o == nil { 60 return nil, false 61 } 62 return &o.Expression, true 63 } 64 65 // SetExpression sets field value 66 func (o *SecretDecryptAction) SetExpression(v string) { 67 o.Expression = v 68 } 69 70 // GetOrganization returns the Organization field value 71 func (o *SecretDecryptAction) GetOrganization() string { 72 if o == nil { 73 var ret string 74 return ret 75 } 76 77 return o.Organization 78 } 79 80 // GetOrganizationOk returns a tuple with the Organization field value 81 // and a boolean to check if the value has been set. 82 func (o *SecretDecryptAction) GetOrganizationOk() (*string, bool) { 83 if o == nil { 84 return nil, false 85 } 86 return &o.Organization, true 87 } 88 89 // SetOrganization sets field value 90 func (o *SecretDecryptAction) SetOrganization(v string) { 91 o.Organization = v 92 } 93 94 func (o SecretDecryptAction) 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 SecretDecryptAction) ToMap() (map[string]interface{}, error) { 103 toSerialize := map[string]interface{}{} 104 toSerialize["expression"] = o.Expression 105 toSerialize["organization"] = o.Organization 106 return toSerialize, nil 107 } 108 109 type NullableSecretDecryptAction struct { 110 value *SecretDecryptAction 111 isSet bool 112 } 113 114 func (v NullableSecretDecryptAction) Get() *SecretDecryptAction { 115 return v.value 116 } 117 118 func (v *NullableSecretDecryptAction) Set(val *SecretDecryptAction) { 119 v.value = val 120 v.isSet = true 121 } 122 123 func (v NullableSecretDecryptAction) IsSet() bool { 124 return v.isSet 125 } 126 127 func (v *NullableSecretDecryptAction) Unset() { 128 v.value = nil 129 v.isSet = false 130 } 131 132 func NewNullableSecretDecryptAction(val *SecretDecryptAction) *NullableSecretDecryptAction { 133 return &NullableSecretDecryptAction{value: val, isSet: true} 134 } 135 136 func (v NullableSecretDecryptAction) MarshalJSON() ([]byte, error) { 137 return json.Marshal(v.value) 138 } 139 140 func (v *NullableSecretDecryptAction) UnmarshalJSON(src []byte) error { 141 v.isSet = true 142 return json.Unmarshal(src, &v.value) 143 }