Files
sdk/model_team_stats_user.go

155 lines
3.8 KiB
Go

/*
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hanzoai
import (
"encoding/json"
)
// checks if the TeamStatsUser type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TeamStatsUser{}
// TeamStatsUser struct for TeamStatsUser
type TeamStatsUser struct {
// UserID is the account the session is authenticated as.
UserId *string `json:"userId,omitempty"`
AdditionalProperties map[string]interface{}
}
type _TeamStatsUser TeamStatsUser
// NewTeamStatsUser instantiates a new TeamStatsUser object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewTeamStatsUser() *TeamStatsUser {
this := TeamStatsUser{}
return &this
}
// NewTeamStatsUserWithDefaults instantiates a new TeamStatsUser object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewTeamStatsUserWithDefaults() *TeamStatsUser {
this := TeamStatsUser{}
return &this
}
// GetUserId returns the UserId field value if set, zero value otherwise.
func (o *TeamStatsUser) GetUserId() string {
if o == nil || IsNil(o.UserId) {
var ret string
return ret
}
return *o.UserId
}
// GetUserIdOk returns a tuple with the UserId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TeamStatsUser) GetUserIdOk() (*string, bool) {
if o == nil || IsNil(o.UserId) {
return nil, false
}
return o.UserId, true
}
// HasUserId returns a boolean if a field has been set.
func (o *TeamStatsUser) HasUserId() bool {
if o != nil && !IsNil(o.UserId) {
return true
}
return false
}
// SetUserId gets a reference to the given string and assigns it to the UserId field.
func (o *TeamStatsUser) SetUserId(v string) {
o.UserId = &v
}
func (o TeamStatsUser) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TeamStatsUser) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.UserId) {
toSerialize["userId"] = o.UserId
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *TeamStatsUser) UnmarshalJSON(data []byte) (err error) {
varTeamStatsUser := _TeamStatsUser{}
err = json.Unmarshal(data, &varTeamStatsUser)
if err != nil {
return err
}
*o = TeamStatsUser(varTeamStatsUser)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "userId")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableTeamStatsUser struct {
value *TeamStatsUser
isSet bool
}
func (v NullableTeamStatsUser) Get() *TeamStatsUser {
return v.value
}
func (v *NullableTeamStatsUser) Set(val *TeamStatsUser) {
v.value = val
v.isSet = true
}
func (v NullableTeamStatsUser) IsSet() bool {
return v.isSet
}
func (v *NullableTeamStatsUser) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTeamStatsUser(val *TeamStatsUser) *NullableTeamStatsUser {
return &NullableTeamStatsUser{value: val, isSet: true}
}
func (v NullableTeamStatsUser) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTeamStatsUser) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}