bunnyshell.com/sdk@v0.16.0/model_secret_transcrypt_configuration_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 SecretTranscryptConfigurationAction type satisfies the MappedNullable interface at compile time
    19  var _ MappedNullable = &SecretTranscryptConfigurationAction{}
    20  
    21  // SecretTranscryptConfigurationAction A secret is used to encrypt plain texts and decrypt cipher texts.
    22  type SecretTranscryptConfigurationAction struct {
    23  	Yaml         string `json:"yaml"`
    24  	Mode         string `json:"mode"`
    25  	Organization string `json:"organization"`
    26  }
    27  
    28  // NewSecretTranscryptConfigurationAction instantiates a new SecretTranscryptConfigurationAction 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 NewSecretTranscryptConfigurationAction(yaml string, mode string, organization string) *SecretTranscryptConfigurationAction {
    33  	this := SecretTranscryptConfigurationAction{}
    34  	this.Yaml = yaml
    35  	this.Mode = mode
    36  	this.Organization = organization
    37  	return &this
    38  }
    39  
    40  // NewSecretTranscryptConfigurationActionWithDefaults instantiates a new SecretTranscryptConfigurationAction object
    41  // This constructor will only assign default values to properties that have it defined,
    42  // but it doesn't guarantee that properties required by API are set
    43  func NewSecretTranscryptConfigurationActionWithDefaults() *SecretTranscryptConfigurationAction {
    44  	this := SecretTranscryptConfigurationAction{}
    45  	return &this
    46  }
    47  
    48  // GetYaml returns the Yaml field value
    49  func (o *SecretTranscryptConfigurationAction) GetYaml() string {
    50  	if o == nil {
    51  		var ret string
    52  		return ret
    53  	}
    54  
    55  	return o.Yaml
    56  }
    57  
    58  // GetYamlOk returns a tuple with the Yaml field value
    59  // and a boolean to check if the value has been set.
    60  func (o *SecretTranscryptConfigurationAction) GetYamlOk() (*string, bool) {
    61  	if o == nil {
    62  		return nil, false
    63  	}
    64  	return &o.Yaml, true
    65  }
    66  
    67  // SetYaml sets field value
    68  func (o *SecretTranscryptConfigurationAction) SetYaml(v string) {
    69  	o.Yaml = v
    70  }
    71  
    72  // GetMode returns the Mode field value
    73  func (o *SecretTranscryptConfigurationAction) GetMode() string {
    74  	if o == nil {
    75  		var ret string
    76  		return ret
    77  	}
    78  
    79  	return o.Mode
    80  }
    81  
    82  // GetModeOk returns a tuple with the Mode field value
    83  // and a boolean to check if the value has been set.
    84  func (o *SecretTranscryptConfigurationAction) GetModeOk() (*string, bool) {
    85  	if o == nil {
    86  		return nil, false
    87  	}
    88  	return &o.Mode, true
    89  }
    90  
    91  // SetMode sets field value
    92  func (o *SecretTranscryptConfigurationAction) SetMode(v string) {
    93  	o.Mode = v
    94  }
    95  
    96  // GetOrganization returns the Organization field value
    97  func (o *SecretTranscryptConfigurationAction) GetOrganization() string {
    98  	if o == nil {
    99  		var ret string
   100  		return ret
   101  	}
   102  
   103  	return o.Organization
   104  }
   105  
   106  // GetOrganizationOk returns a tuple with the Organization field value
   107  // and a boolean to check if the value has been set.
   108  func (o *SecretTranscryptConfigurationAction) GetOrganizationOk() (*string, bool) {
   109  	if o == nil {
   110  		return nil, false
   111  	}
   112  	return &o.Organization, true
   113  }
   114  
   115  // SetOrganization sets field value
   116  func (o *SecretTranscryptConfigurationAction) SetOrganization(v string) {
   117  	o.Organization = v
   118  }
   119  
   120  func (o SecretTranscryptConfigurationAction) MarshalJSON() ([]byte, error) {
   121  	toSerialize, err := o.ToMap()
   122  	if err != nil {
   123  		return []byte{}, err
   124  	}
   125  	return json.Marshal(toSerialize)
   126  }
   127  
   128  func (o SecretTranscryptConfigurationAction) ToMap() (map[string]interface{}, error) {
   129  	toSerialize := map[string]interface{}{}
   130  	toSerialize["yaml"] = o.Yaml
   131  	toSerialize["mode"] = o.Mode
   132  	toSerialize["organization"] = o.Organization
   133  	return toSerialize, nil
   134  }
   135  
   136  type NullableSecretTranscryptConfigurationAction struct {
   137  	value *SecretTranscryptConfigurationAction
   138  	isSet bool
   139  }
   140  
   141  func (v NullableSecretTranscryptConfigurationAction) Get() *SecretTranscryptConfigurationAction {
   142  	return v.value
   143  }
   144  
   145  func (v *NullableSecretTranscryptConfigurationAction) Set(val *SecretTranscryptConfigurationAction) {
   146  	v.value = val
   147  	v.isSet = true
   148  }
   149  
   150  func (v NullableSecretTranscryptConfigurationAction) IsSet() bool {
   151  	return v.isSet
   152  }
   153  
   154  func (v *NullableSecretTranscryptConfigurationAction) Unset() {
   155  	v.value = nil
   156  	v.isSet = false
   157  }
   158  
   159  func NewNullableSecretTranscryptConfigurationAction(val *SecretTranscryptConfigurationAction) *NullableSecretTranscryptConfigurationAction {
   160  	return &NullableSecretTranscryptConfigurationAction{value: val, isSet: true}
   161  }
   162  
   163  func (v NullableSecretTranscryptConfigurationAction) MarshalJSON() ([]byte, error) {
   164  	return json.Marshal(v.value)
   165  }
   166  
   167  func (v *NullableSecretTranscryptConfigurationAction) UnmarshalJSON(src []byte) error {
   168  	v.isSet = true
   169  	return json.Unmarshal(src, &v.value)
   170  }