bunnyshell.com/sdk@v0.16.0/model_secret_encrypted_item.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 SecretEncryptedItem type satisfies the MappedNullable interface at compile time 19 var _ MappedNullable = &SecretEncryptedItem{} 20 21 // SecretEncryptedItem A secret is used to encrypt plain texts and decrypt cipher texts. 22 type SecretEncryptedItem struct { 23 // Encrypted expression. 24 Expression *string `json:"expression,omitempty"` 25 // Organization identifier. 26 Organization *string `json:"organization,omitempty"` 27 } 28 29 // NewSecretEncryptedItem instantiates a new SecretEncryptedItem object 30 // This constructor will assign default values to properties that have it defined, 31 // and makes sure properties required by API are set, but the set of arguments 32 // will change when the set of required properties is changed 33 func NewSecretEncryptedItem() *SecretEncryptedItem { 34 this := SecretEncryptedItem{} 35 return &this 36 } 37 38 // NewSecretEncryptedItemWithDefaults instantiates a new SecretEncryptedItem 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 NewSecretEncryptedItemWithDefaults() *SecretEncryptedItem { 42 this := SecretEncryptedItem{} 43 return &this 44 } 45 46 // GetExpression returns the Expression field value if set, zero value otherwise. 47 func (o *SecretEncryptedItem) GetExpression() string { 48 if o == nil || IsNil(o.Expression) { 49 var ret string 50 return ret 51 } 52 return *o.Expression 53 } 54 55 // GetExpressionOk returns a tuple with the Expression field value if set, nil otherwise 56 // and a boolean to check if the value has been set. 57 func (o *SecretEncryptedItem) GetExpressionOk() (*string, bool) { 58 if o == nil || IsNil(o.Expression) { 59 return nil, false 60 } 61 return o.Expression, true 62 } 63 64 // HasExpression returns a boolean if a field has been set. 65 func (o *SecretEncryptedItem) HasExpression() bool { 66 if o != nil && !IsNil(o.Expression) { 67 return true 68 } 69 70 return false 71 } 72 73 // SetExpression gets a reference to the given string and assigns it to the Expression field. 74 func (o *SecretEncryptedItem) SetExpression(v string) { 75 o.Expression = &v 76 } 77 78 // GetOrganization returns the Organization field value if set, zero value otherwise. 79 func (o *SecretEncryptedItem) GetOrganization() string { 80 if o == nil || IsNil(o.Organization) { 81 var ret string 82 return ret 83 } 84 return *o.Organization 85 } 86 87 // GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise 88 // and a boolean to check if the value has been set. 89 func (o *SecretEncryptedItem) GetOrganizationOk() (*string, bool) { 90 if o == nil || IsNil(o.Organization) { 91 return nil, false 92 } 93 return o.Organization, true 94 } 95 96 // HasOrganization returns a boolean if a field has been set. 97 func (o *SecretEncryptedItem) HasOrganization() bool { 98 if o != nil && !IsNil(o.Organization) { 99 return true 100 } 101 102 return false 103 } 104 105 // SetOrganization gets a reference to the given string and assigns it to the Organization field. 106 func (o *SecretEncryptedItem) SetOrganization(v string) { 107 o.Organization = &v 108 } 109 110 func (o SecretEncryptedItem) MarshalJSON() ([]byte, error) { 111 toSerialize, err := o.ToMap() 112 if err != nil { 113 return []byte{}, err 114 } 115 return json.Marshal(toSerialize) 116 } 117 118 func (o SecretEncryptedItem) ToMap() (map[string]interface{}, error) { 119 toSerialize := map[string]interface{}{} 120 if !IsNil(o.Expression) { 121 toSerialize["expression"] = o.Expression 122 } 123 if !IsNil(o.Organization) { 124 toSerialize["organization"] = o.Organization 125 } 126 return toSerialize, nil 127 } 128 129 type NullableSecretEncryptedItem struct { 130 value *SecretEncryptedItem 131 isSet bool 132 } 133 134 func (v NullableSecretEncryptedItem) Get() *SecretEncryptedItem { 135 return v.value 136 } 137 138 func (v *NullableSecretEncryptedItem) Set(val *SecretEncryptedItem) { 139 v.value = val 140 v.isSet = true 141 } 142 143 func (v NullableSecretEncryptedItem) IsSet() bool { 144 return v.isSet 145 } 146 147 func (v *NullableSecretEncryptedItem) Unset() { 148 v.value = nil 149 v.isSet = false 150 } 151 152 func NewNullableSecretEncryptedItem(val *SecretEncryptedItem) *NullableSecretEncryptedItem { 153 return &NullableSecretEncryptedItem{value: val, isSet: true} 154 } 155 156 func (v NullableSecretEncryptedItem) MarshalJSON() ([]byte, error) { 157 return json.Marshal(v.value) 158 } 159 160 func (v *NullableSecretEncryptedItem) UnmarshalJSON(src []byte) error { 161 v.isSet = true 162 return json.Unmarshal(src, &v.value) 163 }