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