github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_subscription_owner.go (about)

     1  /*
     2   * Cios Openapi
     3   *
     4   * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
     5   *
     6   * API version: 1.0.1
     7   */
     8  
     9  // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
    10  
    11  package cios
    12  
    13  import (
    14  	"encoding/json"
    15  )
    16  
    17  // SubscriptionOwner struct for SubscriptionOwner
    18  type SubscriptionOwner struct {
    19  	// Corporation: 企業 User: ユーザー 
    20  	Type *string `json:"type,omitempty"`
    21  	Id string `json:"id"`
    22  }
    23  
    24  // NewSubscriptionOwner instantiates a new SubscriptionOwner object
    25  // This constructor will assign default values to properties that have it defined,
    26  // and makes sure properties required by API are set, but the set of arguments
    27  // will change when the set of required properties is changed
    28  func NewSubscriptionOwner(id string, ) *SubscriptionOwner {
    29  	this := SubscriptionOwner{}
    30  	this.Id = id
    31  	return &this
    32  }
    33  
    34  // NewSubscriptionOwnerWithDefaults instantiates a new SubscriptionOwner object
    35  // This constructor will only assign default values to properties that have it defined,
    36  // but it doesn't guarantee that properties required by API are set
    37  func NewSubscriptionOwnerWithDefaults() *SubscriptionOwner {
    38  	this := SubscriptionOwner{}
    39  	return &this
    40  }
    41  
    42  // GetType returns the Type field value if set, zero value otherwise.
    43  func (o *SubscriptionOwner) GetType() string {
    44  	if o == nil || o.Type == nil {
    45  		var ret string
    46  		return ret
    47  	}
    48  	return *o.Type
    49  }
    50  
    51  // GetTypeOk returns a tuple with the Type field value if set, nil otherwise
    52  // and a boolean to check if the value has been set.
    53  func (o *SubscriptionOwner) GetTypeOk() (*string, bool) {
    54  	if o == nil || o.Type == nil {
    55  		return nil, false
    56  	}
    57  	return o.Type, true
    58  }
    59  
    60  // HasType returns a boolean if a field has been set.
    61  func (o *SubscriptionOwner) HasType() bool {
    62  	if o != nil && o.Type != nil {
    63  		return true
    64  	}
    65  
    66  	return false
    67  }
    68  
    69  // SetType gets a reference to the given string and assigns it to the Type field.
    70  func (o *SubscriptionOwner) SetType(v string) {
    71  	o.Type = &v
    72  }
    73  
    74  // GetId returns the Id field value
    75  func (o *SubscriptionOwner) GetId() string {
    76  	if o == nil  {
    77  		var ret string
    78  		return ret
    79  	}
    80  
    81  	return o.Id
    82  }
    83  
    84  // GetIdOk returns a tuple with the Id field value
    85  // and a boolean to check if the value has been set.
    86  func (o *SubscriptionOwner) GetIdOk() (*string, bool) {
    87  	if o == nil  {
    88  		return nil, false
    89  	}
    90  	return &o.Id, true
    91  }
    92  
    93  // SetId sets field value
    94  func (o *SubscriptionOwner) SetId(v string) {
    95  	o.Id = v
    96  }
    97  
    98  func (o SubscriptionOwner) MarshalJSON() ([]byte, error) {
    99  	toSerialize := map[string]interface{}{}
   100  	if o.Type != nil {
   101  		toSerialize["type"] = o.Type
   102  	}
   103  	if true {
   104  		toSerialize["id"] = o.Id
   105  	}
   106  	return json.Marshal(toSerialize)
   107  }
   108  
   109  type NullableSubscriptionOwner struct {
   110  	value *SubscriptionOwner
   111  	isSet bool
   112  }
   113  
   114  func (v NullableSubscriptionOwner) Get() *SubscriptionOwner {
   115  	return v.value
   116  }
   117  
   118  func (v *NullableSubscriptionOwner) Set(val *SubscriptionOwner) {
   119  	v.value = val
   120  	v.isSet = true
   121  }
   122  
   123  func (v NullableSubscriptionOwner) IsSet() bool {
   124  	return v.isSet
   125  }
   126  
   127  func (v *NullableSubscriptionOwner) Unset() {
   128  	v.value = nil
   129  	v.isSet = false
   130  }
   131  
   132  func NewNullableSubscriptionOwner(val *SubscriptionOwner) *NullableSubscriptionOwner {
   133  	return &NullableSubscriptionOwner{value: val, isSet: true}
   134  }
   135  
   136  func (v NullableSubscriptionOwner) MarshalJSON() ([]byte, error) {
   137  	return json.Marshal(v.value)
   138  }
   139  
   140  func (v *NullableSubscriptionOwner) UnmarshalJSON(src []byte) error {
   141  	v.isSet = true
   142  	return json.Unmarshal(src, &v.value)
   143  }
   144  
   145