mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
418 lines
11 KiB
Go
418 lines
11 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"
|
|
"time"
|
|
)
|
|
|
|
// checks if the O11yUser type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &O11yUser{}
|
|
|
|
// O11yUser struct for O11yUser
|
|
type O11yUser struct {
|
|
CreatedAt *time.Time `json:"createdAt,omitempty"`
|
|
DisplayName *string `json:"displayName,omitempty"`
|
|
Email interface{} `json:"email,omitempty"`
|
|
Id interface{} `json:"id,omitempty"`
|
|
IsRoot *bool `json:"isRoot,omitempty"`
|
|
OrgId interface{} `json:"orgId,omitempty"`
|
|
Status interface{} `json:"status,omitempty"`
|
|
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _O11yUser O11yUser
|
|
|
|
// NewO11yUser instantiates a new O11yUser 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 NewO11yUser() *O11yUser {
|
|
this := O11yUser{}
|
|
return &this
|
|
}
|
|
|
|
// NewO11yUserWithDefaults instantiates a new O11yUser 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 NewO11yUserWithDefaults() *O11yUser {
|
|
this := O11yUser{}
|
|
return &this
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
|
func (o *O11yUser) GetCreatedAt() time.Time {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
return *o.CreatedAt
|
|
}
|
|
|
|
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yUser) GetCreatedAtOk() (*time.Time, bool) {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
return nil, false
|
|
}
|
|
return o.CreatedAt, true
|
|
}
|
|
|
|
// HasCreatedAt returns a boolean if a field has been set.
|
|
func (o *O11yUser) HasCreatedAt() bool {
|
|
if o != nil && !IsNil(o.CreatedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
|
|
func (o *O11yUser) SetCreatedAt(v time.Time) {
|
|
o.CreatedAt = &v
|
|
}
|
|
|
|
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
|
|
func (o *O11yUser) GetDisplayName() string {
|
|
if o == nil || IsNil(o.DisplayName) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.DisplayName
|
|
}
|
|
|
|
// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yUser) GetDisplayNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.DisplayName) {
|
|
return nil, false
|
|
}
|
|
return o.DisplayName, true
|
|
}
|
|
|
|
// HasDisplayName returns a boolean if a field has been set.
|
|
func (o *O11yUser) HasDisplayName() bool {
|
|
if o != nil && !IsNil(o.DisplayName) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
|
|
func (o *O11yUser) SetDisplayName(v string) {
|
|
o.DisplayName = &v
|
|
}
|
|
|
|
// GetEmail returns the Email field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *O11yUser) GetEmail() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.Email
|
|
}
|
|
|
|
// GetEmailOk returns a tuple with the Email field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *O11yUser) GetEmailOk() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.Email) {
|
|
return nil, false
|
|
}
|
|
return &o.Email, true
|
|
}
|
|
|
|
// HasEmail returns a boolean if a field has been set.
|
|
func (o *O11yUser) HasEmail() bool {
|
|
if o != nil && !IsNil(o.Email) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEmail gets a reference to the given interface{} and assigns it to the Email field.
|
|
func (o *O11yUser) SetEmail(v interface{}) {
|
|
o.Email = v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *O11yUser) GetId() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *O11yUser) GetIdOk() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return &o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *O11yUser) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given interface{} and assigns it to the Id field.
|
|
func (o *O11yUser) SetId(v interface{}) {
|
|
o.Id = v
|
|
}
|
|
|
|
// GetIsRoot returns the IsRoot field value if set, zero value otherwise.
|
|
func (o *O11yUser) GetIsRoot() bool {
|
|
if o == nil || IsNil(o.IsRoot) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.IsRoot
|
|
}
|
|
|
|
// GetIsRootOk returns a tuple with the IsRoot field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yUser) GetIsRootOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.IsRoot) {
|
|
return nil, false
|
|
}
|
|
return o.IsRoot, true
|
|
}
|
|
|
|
// HasIsRoot returns a boolean if a field has been set.
|
|
func (o *O11yUser) HasIsRoot() bool {
|
|
if o != nil && !IsNil(o.IsRoot) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetIsRoot gets a reference to the given bool and assigns it to the IsRoot field.
|
|
func (o *O11yUser) SetIsRoot(v bool) {
|
|
o.IsRoot = &v
|
|
}
|
|
|
|
// GetOrgId returns the OrgId field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *O11yUser) GetOrgId() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.OrgId
|
|
}
|
|
|
|
// GetOrgIdOk returns a tuple with the OrgId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *O11yUser) GetOrgIdOk() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.OrgId) {
|
|
return nil, false
|
|
}
|
|
return &o.OrgId, true
|
|
}
|
|
|
|
// HasOrgId returns a boolean if a field has been set.
|
|
func (o *O11yUser) HasOrgId() bool {
|
|
if o != nil && !IsNil(o.OrgId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOrgId gets a reference to the given interface{} and assigns it to the OrgId field.
|
|
func (o *O11yUser) SetOrgId(v interface{}) {
|
|
o.OrgId = v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *O11yUser) GetStatus() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *O11yUser) GetStatusOk() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return nil, false
|
|
}
|
|
return &o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *O11yUser) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given interface{} and assigns it to the Status field.
|
|
func (o *O11yUser) SetStatus(v interface{}) {
|
|
o.Status = v
|
|
}
|
|
|
|
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
|
func (o *O11yUser) GetUpdatedAt() time.Time {
|
|
if o == nil || IsNil(o.UpdatedAt) {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
return *o.UpdatedAt
|
|
}
|
|
|
|
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yUser) GetUpdatedAtOk() (*time.Time, bool) {
|
|
if o == nil || IsNil(o.UpdatedAt) {
|
|
return nil, false
|
|
}
|
|
return o.UpdatedAt, true
|
|
}
|
|
|
|
// HasUpdatedAt returns a boolean if a field has been set.
|
|
func (o *O11yUser) HasUpdatedAt() bool {
|
|
if o != nil && !IsNil(o.UpdatedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
|
|
func (o *O11yUser) SetUpdatedAt(v time.Time) {
|
|
o.UpdatedAt = &v
|
|
}
|
|
|
|
func (o O11yUser) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o O11yUser) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.CreatedAt) {
|
|
toSerialize["createdAt"] = o.CreatedAt
|
|
}
|
|
if !IsNil(o.DisplayName) {
|
|
toSerialize["displayName"] = o.DisplayName
|
|
}
|
|
if o.Email != nil {
|
|
toSerialize["email"] = o.Email
|
|
}
|
|
if o.Id != nil {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.IsRoot) {
|
|
toSerialize["isRoot"] = o.IsRoot
|
|
}
|
|
if o.OrgId != nil {
|
|
toSerialize["orgId"] = o.OrgId
|
|
}
|
|
if o.Status != nil {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
if !IsNil(o.UpdatedAt) {
|
|
toSerialize["updatedAt"] = o.UpdatedAt
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *O11yUser) UnmarshalJSON(data []byte) (err error) {
|
|
varO11yUser := _O11yUser{}
|
|
|
|
err = json.Unmarshal(data, &varO11yUser)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = O11yUser(varO11yUser)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "createdAt")
|
|
delete(additionalProperties, "displayName")
|
|
delete(additionalProperties, "email")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "isRoot")
|
|
delete(additionalProperties, "orgId")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "updatedAt")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableO11yUser struct {
|
|
value *O11yUser
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableO11yUser) Get() *O11yUser {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableO11yUser) Set(val *O11yUser) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableO11yUser) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableO11yUser) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableO11yUser(val *O11yUser) *NullableO11yUser {
|
|
return &NullableO11yUser{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableO11yUser) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableO11yUser) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|