bunnyshell.com/sdk@v0.16.0/model_environment_clone_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 EnvironmentCloneAction type satisfies the MappedNullable interface at compile time
    19  var _ MappedNullable = &EnvironmentCloneAction{}
    20  
    21  // EnvironmentCloneAction An environment holds a collection of buildable and deployable components.
    22  type EnvironmentCloneAction struct {
    23  	Name string `json:"name"`
    24  }
    25  
    26  // NewEnvironmentCloneAction instantiates a new EnvironmentCloneAction object
    27  // This constructor will assign default values to properties that have it defined,
    28  // and makes sure properties required by API are set, but the set of arguments
    29  // will change when the set of required properties is changed
    30  func NewEnvironmentCloneAction(name string) *EnvironmentCloneAction {
    31  	this := EnvironmentCloneAction{}
    32  	this.Name = name
    33  	return &this
    34  }
    35  
    36  // NewEnvironmentCloneActionWithDefaults instantiates a new EnvironmentCloneAction object
    37  // This constructor will only assign default values to properties that have it defined,
    38  // but it doesn't guarantee that properties required by API are set
    39  func NewEnvironmentCloneActionWithDefaults() *EnvironmentCloneAction {
    40  	this := EnvironmentCloneAction{}
    41  	return &this
    42  }
    43  
    44  // GetName returns the Name field value
    45  func (o *EnvironmentCloneAction) GetName() string {
    46  	if o == nil {
    47  		var ret string
    48  		return ret
    49  	}
    50  
    51  	return o.Name
    52  }
    53  
    54  // GetNameOk returns a tuple with the Name field value
    55  // and a boolean to check if the value has been set.
    56  func (o *EnvironmentCloneAction) GetNameOk() (*string, bool) {
    57  	if o == nil {
    58  		return nil, false
    59  	}
    60  	return &o.Name, true
    61  }
    62  
    63  // SetName sets field value
    64  func (o *EnvironmentCloneAction) SetName(v string) {
    65  	o.Name = v
    66  }
    67  
    68  func (o EnvironmentCloneAction) MarshalJSON() ([]byte, error) {
    69  	toSerialize, err := o.ToMap()
    70  	if err != nil {
    71  		return []byte{}, err
    72  	}
    73  	return json.Marshal(toSerialize)
    74  }
    75  
    76  func (o EnvironmentCloneAction) ToMap() (map[string]interface{}, error) {
    77  	toSerialize := map[string]interface{}{}
    78  	toSerialize["name"] = o.Name
    79  	return toSerialize, nil
    80  }
    81  
    82  type NullableEnvironmentCloneAction struct {
    83  	value *EnvironmentCloneAction
    84  	isSet bool
    85  }
    86  
    87  func (v NullableEnvironmentCloneAction) Get() *EnvironmentCloneAction {
    88  	return v.value
    89  }
    90  
    91  func (v *NullableEnvironmentCloneAction) Set(val *EnvironmentCloneAction) {
    92  	v.value = val
    93  	v.isSet = true
    94  }
    95  
    96  func (v NullableEnvironmentCloneAction) IsSet() bool {
    97  	return v.isSet
    98  }
    99  
   100  func (v *NullableEnvironmentCloneAction) Unset() {
   101  	v.value = nil
   102  	v.isSet = false
   103  }
   104  
   105  func NewNullableEnvironmentCloneAction(val *EnvironmentCloneAction) *NullableEnvironmentCloneAction {
   106  	return &NullableEnvironmentCloneAction{value: val, isSet: true}
   107  }
   108  
   109  func (v NullableEnvironmentCloneAction) MarshalJSON() ([]byte, error) {
   110  	return json.Marshal(v.value)
   111  }
   112  
   113  func (v *NullableEnvironmentCloneAction) UnmarshalJSON(src []byte) error {
   114  	v.isSet = true
   115  	return json.Unmarshal(src, &v.value)
   116  }