github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_member_info.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 // MemberInfo struct for MemberInfo 18 type MemberInfo struct { 19 Id *string `json:"id,omitempty"` 20 UserId *string `json:"user_id,omitempty"` 21 Role *string `json:"role,omitempty"` 22 Category *string `json:"category,omitempty"` 23 Invited *bool `json:"invited,omitempty"` 24 Tags *[]string `json:"tags,omitempty"` 25 Profile *MemberInfoProfile `json:"profile,omitempty"` 26 } 27 28 // NewMemberInfo instantiates a new MemberInfo object 29 // This constructor will assign default values to properties that have it defined, 30 // and makes sure properties required by API are set, but the set of arguments 31 // will change when the set of required properties is changed 32 func NewMemberInfo() *MemberInfo { 33 this := MemberInfo{} 34 return &this 35 } 36 37 // NewMemberInfoWithDefaults instantiates a new MemberInfo object 38 // This constructor will only assign default values to properties that have it defined, 39 // but it doesn't guarantee that properties required by API are set 40 func NewMemberInfoWithDefaults() *MemberInfo { 41 this := MemberInfo{} 42 return &this 43 } 44 45 // GetId returns the Id field value if set, zero value otherwise. 46 func (o *MemberInfo) GetId() string { 47 if o == nil || o.Id == nil { 48 var ret string 49 return ret 50 } 51 return *o.Id 52 } 53 54 // GetIdOk returns a tuple with the Id field value if set, nil otherwise 55 // and a boolean to check if the value has been set. 56 func (o *MemberInfo) GetIdOk() (*string, bool) { 57 if o == nil || o.Id == nil { 58 return nil, false 59 } 60 return o.Id, true 61 } 62 63 // HasId returns a boolean if a field has been set. 64 func (o *MemberInfo) HasId() bool { 65 if o != nil && o.Id != nil { 66 return true 67 } 68 69 return false 70 } 71 72 // SetId gets a reference to the given string and assigns it to the Id field. 73 func (o *MemberInfo) SetId(v string) { 74 o.Id = &v 75 } 76 77 // GetUserId returns the UserId field value if set, zero value otherwise. 78 func (o *MemberInfo) GetUserId() string { 79 if o == nil || o.UserId == nil { 80 var ret string 81 return ret 82 } 83 return *o.UserId 84 } 85 86 // GetUserIdOk returns a tuple with the UserId field value if set, nil otherwise 87 // and a boolean to check if the value has been set. 88 func (o *MemberInfo) GetUserIdOk() (*string, bool) { 89 if o == nil || o.UserId == nil { 90 return nil, false 91 } 92 return o.UserId, true 93 } 94 95 // HasUserId returns a boolean if a field has been set. 96 func (o *MemberInfo) HasUserId() bool { 97 if o != nil && o.UserId != nil { 98 return true 99 } 100 101 return false 102 } 103 104 // SetUserId gets a reference to the given string and assigns it to the UserId field. 105 func (o *MemberInfo) SetUserId(v string) { 106 o.UserId = &v 107 } 108 109 // GetRole returns the Role field value if set, zero value otherwise. 110 func (o *MemberInfo) GetRole() string { 111 if o == nil || o.Role == nil { 112 var ret string 113 return ret 114 } 115 return *o.Role 116 } 117 118 // GetRoleOk returns a tuple with the Role field value if set, nil otherwise 119 // and a boolean to check if the value has been set. 120 func (o *MemberInfo) GetRoleOk() (*string, bool) { 121 if o == nil || o.Role == nil { 122 return nil, false 123 } 124 return o.Role, true 125 } 126 127 // HasRole returns a boolean if a field has been set. 128 func (o *MemberInfo) HasRole() bool { 129 if o != nil && o.Role != nil { 130 return true 131 } 132 133 return false 134 } 135 136 // SetRole gets a reference to the given string and assigns it to the Role field. 137 func (o *MemberInfo) SetRole(v string) { 138 o.Role = &v 139 } 140 141 // GetCategory returns the Category field value if set, zero value otherwise. 142 func (o *MemberInfo) GetCategory() string { 143 if o == nil || o.Category == nil { 144 var ret string 145 return ret 146 } 147 return *o.Category 148 } 149 150 // GetCategoryOk returns a tuple with the Category field value if set, nil otherwise 151 // and a boolean to check if the value has been set. 152 func (o *MemberInfo) GetCategoryOk() (*string, bool) { 153 if o == nil || o.Category == nil { 154 return nil, false 155 } 156 return o.Category, true 157 } 158 159 // HasCategory returns a boolean if a field has been set. 160 func (o *MemberInfo) HasCategory() bool { 161 if o != nil && o.Category != nil { 162 return true 163 } 164 165 return false 166 } 167 168 // SetCategory gets a reference to the given string and assigns it to the Category field. 169 func (o *MemberInfo) SetCategory(v string) { 170 o.Category = &v 171 } 172 173 // GetInvited returns the Invited field value if set, zero value otherwise. 174 func (o *MemberInfo) GetInvited() bool { 175 if o == nil || o.Invited == nil { 176 var ret bool 177 return ret 178 } 179 return *o.Invited 180 } 181 182 // GetInvitedOk returns a tuple with the Invited field value if set, nil otherwise 183 // and a boolean to check if the value has been set. 184 func (o *MemberInfo) GetInvitedOk() (*bool, bool) { 185 if o == nil || o.Invited == nil { 186 return nil, false 187 } 188 return o.Invited, true 189 } 190 191 // HasInvited returns a boolean if a field has been set. 192 func (o *MemberInfo) HasInvited() bool { 193 if o != nil && o.Invited != nil { 194 return true 195 } 196 197 return false 198 } 199 200 // SetInvited gets a reference to the given bool and assigns it to the Invited field. 201 func (o *MemberInfo) SetInvited(v bool) { 202 o.Invited = &v 203 } 204 205 // GetTags returns the Tags field value if set, zero value otherwise. 206 func (o *MemberInfo) GetTags() []string { 207 if o == nil || o.Tags == nil { 208 var ret []string 209 return ret 210 } 211 return *o.Tags 212 } 213 214 // GetTagsOk returns a tuple with the Tags field value if set, nil otherwise 215 // and a boolean to check if the value has been set. 216 func (o *MemberInfo) GetTagsOk() (*[]string, bool) { 217 if o == nil || o.Tags == nil { 218 return nil, false 219 } 220 return o.Tags, true 221 } 222 223 // HasTags returns a boolean if a field has been set. 224 func (o *MemberInfo) HasTags() bool { 225 if o != nil && o.Tags != nil { 226 return true 227 } 228 229 return false 230 } 231 232 // SetTags gets a reference to the given []string and assigns it to the Tags field. 233 func (o *MemberInfo) SetTags(v []string) { 234 o.Tags = &v 235 } 236 237 // GetProfile returns the Profile field value if set, zero value otherwise. 238 func (o *MemberInfo) GetProfile() MemberInfoProfile { 239 if o == nil || o.Profile == nil { 240 var ret MemberInfoProfile 241 return ret 242 } 243 return *o.Profile 244 } 245 246 // GetProfileOk returns a tuple with the Profile field value if set, nil otherwise 247 // and a boolean to check if the value has been set. 248 func (o *MemberInfo) GetProfileOk() (*MemberInfoProfile, bool) { 249 if o == nil || o.Profile == nil { 250 return nil, false 251 } 252 return o.Profile, true 253 } 254 255 // HasProfile returns a boolean if a field has been set. 256 func (o *MemberInfo) HasProfile() bool { 257 if o != nil && o.Profile != nil { 258 return true 259 } 260 261 return false 262 } 263 264 // SetProfile gets a reference to the given MemberInfoProfile and assigns it to the Profile field. 265 func (o *MemberInfo) SetProfile(v MemberInfoProfile) { 266 o.Profile = &v 267 } 268 269 func (o MemberInfo) MarshalJSON() ([]byte, error) { 270 toSerialize := map[string]interface{}{} 271 if o.Id != nil { 272 toSerialize["id"] = o.Id 273 } 274 if o.UserId != nil { 275 toSerialize["user_id"] = o.UserId 276 } 277 if o.Role != nil { 278 toSerialize["role"] = o.Role 279 } 280 if o.Category != nil { 281 toSerialize["category"] = o.Category 282 } 283 if o.Invited != nil { 284 toSerialize["invited"] = o.Invited 285 } 286 if o.Tags != nil { 287 toSerialize["tags"] = o.Tags 288 } 289 if o.Profile != nil { 290 toSerialize["profile"] = o.Profile 291 } 292 return json.Marshal(toSerialize) 293 } 294 295 type NullableMemberInfo struct { 296 value *MemberInfo 297 isSet bool 298 } 299 300 func (v NullableMemberInfo) Get() *MemberInfo { 301 return v.value 302 } 303 304 func (v *NullableMemberInfo) Set(val *MemberInfo) { 305 v.value = val 306 v.isSet = true 307 } 308 309 func (v NullableMemberInfo) IsSet() bool { 310 return v.isSet 311 } 312 313 func (v *NullableMemberInfo) Unset() { 314 v.value = nil 315 v.isSet = false 316 } 317 318 func NewNullableMemberInfo(val *MemberInfo) *NullableMemberInfo { 319 return &NullableMemberInfo{value: val, isSet: true} 320 } 321 322 func (v NullableMemberInfo) MarshalJSON() ([]byte, error) { 323 return json.Marshal(v.value) 324 } 325 326 func (v *NullableMemberInfo) UnmarshalJSON(src []byte) error { 327 v.isSet = true 328 return json.Unmarshal(src, &v.value) 329 } 330 331