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