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