github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_contract_user_license.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 // ContractUserLicense struct for ContractUserLicense 18 type ContractUserLicense struct { 19 // ISO8601 20 IssuedAt *string `json:"issued_at,omitempty"` 21 // ISO8601 22 ExpiresAt *string `json:"expires_at,omitempty"` 23 } 24 25 // NewContractUserLicense instantiates a new ContractUserLicense object 26 // This constructor will assign default values to properties that have it defined, 27 // and makes sure properties required by API are set, but the set of arguments 28 // will change when the set of required properties is changed 29 func NewContractUserLicense() *ContractUserLicense { 30 this := ContractUserLicense{} 31 return &this 32 } 33 34 // NewContractUserLicenseWithDefaults instantiates a new ContractUserLicense 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 NewContractUserLicenseWithDefaults() *ContractUserLicense { 38 this := ContractUserLicense{} 39 return &this 40 } 41 42 // GetIssuedAt returns the IssuedAt field value if set, zero value otherwise. 43 func (o *ContractUserLicense) GetIssuedAt() string { 44 if o == nil || o.IssuedAt == nil { 45 var ret string 46 return ret 47 } 48 return *o.IssuedAt 49 } 50 51 // GetIssuedAtOk returns a tuple with the IssuedAt field value if set, nil otherwise 52 // and a boolean to check if the value has been set. 53 func (o *ContractUserLicense) GetIssuedAtOk() (*string, bool) { 54 if o == nil || o.IssuedAt == nil { 55 return nil, false 56 } 57 return o.IssuedAt, true 58 } 59 60 // HasIssuedAt returns a boolean if a field has been set. 61 func (o *ContractUserLicense) HasIssuedAt() bool { 62 if o != nil && o.IssuedAt != nil { 63 return true 64 } 65 66 return false 67 } 68 69 // SetIssuedAt gets a reference to the given string and assigns it to the IssuedAt field. 70 func (o *ContractUserLicense) SetIssuedAt(v string) { 71 o.IssuedAt = &v 72 } 73 74 // GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise. 75 func (o *ContractUserLicense) GetExpiresAt() string { 76 if o == nil || o.ExpiresAt == nil { 77 var ret string 78 return ret 79 } 80 return *o.ExpiresAt 81 } 82 83 // GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise 84 // and a boolean to check if the value has been set. 85 func (o *ContractUserLicense) GetExpiresAtOk() (*string, bool) { 86 if o == nil || o.ExpiresAt == nil { 87 return nil, false 88 } 89 return o.ExpiresAt, true 90 } 91 92 // HasExpiresAt returns a boolean if a field has been set. 93 func (o *ContractUserLicense) HasExpiresAt() bool { 94 if o != nil && o.ExpiresAt != nil { 95 return true 96 } 97 98 return false 99 } 100 101 // SetExpiresAt gets a reference to the given string and assigns it to the ExpiresAt field. 102 func (o *ContractUserLicense) SetExpiresAt(v string) { 103 o.ExpiresAt = &v 104 } 105 106 func (o ContractUserLicense) MarshalJSON() ([]byte, error) { 107 toSerialize := map[string]interface{}{} 108 if o.IssuedAt != nil { 109 toSerialize["issued_at"] = o.IssuedAt 110 } 111 if o.ExpiresAt != nil { 112 toSerialize["expires_at"] = o.ExpiresAt 113 } 114 return json.Marshal(toSerialize) 115 } 116 117 type NullableContractUserLicense struct { 118 value *ContractUserLicense 119 isSet bool 120 } 121 122 func (v NullableContractUserLicense) Get() *ContractUserLicense { 123 return v.value 124 } 125 126 func (v *NullableContractUserLicense) Set(val *ContractUserLicense) { 127 v.value = val 128 v.isSet = true 129 } 130 131 func (v NullableContractUserLicense) IsSet() bool { 132 return v.isSet 133 } 134 135 func (v *NullableContractUserLicense) Unset() { 136 v.value = nil 137 v.isSet = false 138 } 139 140 func NewNullableContractUserLicense(val *ContractUserLicense) *NullableContractUserLicense { 141 return &NullableContractUserLicense{value: val, isSet: true} 142 } 143 144 func (v NullableContractUserLicense) MarshalJSON() ([]byte, error) { 145 return json.Marshal(v.value) 146 } 147 148 func (v *NullableContractUserLicense) UnmarshalJSON(src []byte) error { 149 v.isSet = true 150 return json.Unmarshal(src, &v.value) 151 } 152 153