mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 12:50:05 +01:00
fix: rename sdk to match repo & introduce git subtree
This commit is contained in:
342
sdk/go/model_handlers_user_api_key_out.go
Normal file
342
sdk/go/model_handlers_user_api_key_out.go
Normal file
@@ -0,0 +1,342 @@
|
||||
/*
|
||||
AutoGlue API
|
||||
|
||||
API for managing K3s clusters across cloud providers
|
||||
|
||||
API version: 1.0
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package autoglue
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the HandlersUserAPIKeyOut type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &HandlersUserAPIKeyOut{}
|
||||
|
||||
// HandlersUserAPIKeyOut struct for HandlersUserAPIKeyOut
|
||||
type HandlersUserAPIKeyOut struct {
|
||||
CreatedAt *string `json:"created_at,omitempty"`
|
||||
ExpiresAt *string `json:"expires_at,omitempty"`
|
||||
Id *string `json:"id,omitempty"`
|
||||
LastUsedAt *string `json:"last_used_at,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
// Shown only on create:
|
||||
Plain *string `json:"plain,omitempty"`
|
||||
// \"user\"
|
||||
Scope *string `json:"scope,omitempty"`
|
||||
}
|
||||
|
||||
// NewHandlersUserAPIKeyOut instantiates a new HandlersUserAPIKeyOut 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 NewHandlersUserAPIKeyOut() *HandlersUserAPIKeyOut {
|
||||
this := HandlersUserAPIKeyOut{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewHandlersUserAPIKeyOutWithDefaults instantiates a new HandlersUserAPIKeyOut 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 NewHandlersUserAPIKeyOutWithDefaults() *HandlersUserAPIKeyOut {
|
||||
this := HandlersUserAPIKeyOut{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
||||
func (o *HandlersUserAPIKeyOut) GetCreatedAt() string {
|
||||
if o == nil || IsNil(o.CreatedAt) {
|
||||
var ret string
|
||||
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 *HandlersUserAPIKeyOut) GetCreatedAtOk() (*string, 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 *HandlersUserAPIKeyOut) HasCreatedAt() bool {
|
||||
if o != nil && !IsNil(o.CreatedAt) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field.
|
||||
func (o *HandlersUserAPIKeyOut) SetCreatedAt(v string) {
|
||||
o.CreatedAt = &v
|
||||
}
|
||||
|
||||
// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise.
|
||||
func (o *HandlersUserAPIKeyOut) GetExpiresAt() string {
|
||||
if o == nil || IsNil(o.ExpiresAt) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.ExpiresAt
|
||||
}
|
||||
|
||||
// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *HandlersUserAPIKeyOut) GetExpiresAtOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.ExpiresAt) {
|
||||
return nil, false
|
||||
}
|
||||
return o.ExpiresAt, true
|
||||
}
|
||||
|
||||
// HasExpiresAt returns a boolean if a field has been set.
|
||||
func (o *HandlersUserAPIKeyOut) HasExpiresAt() bool {
|
||||
if o != nil && !IsNil(o.ExpiresAt) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetExpiresAt gets a reference to the given string and assigns it to the ExpiresAt field.
|
||||
func (o *HandlersUserAPIKeyOut) SetExpiresAt(v string) {
|
||||
o.ExpiresAt = &v
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *HandlersUserAPIKeyOut) GetId() string {
|
||||
if o == nil || IsNil(o.Id) {
|
||||
var ret string
|
||||
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.
|
||||
func (o *HandlersUserAPIKeyOut) GetIdOk() (*string, 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 *HandlersUserAPIKeyOut) HasId() bool {
|
||||
if o != nil && !IsNil(o.Id) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetId gets a reference to the given string and assigns it to the Id field.
|
||||
func (o *HandlersUserAPIKeyOut) SetId(v string) {
|
||||
o.Id = &v
|
||||
}
|
||||
|
||||
// GetLastUsedAt returns the LastUsedAt field value if set, zero value otherwise.
|
||||
func (o *HandlersUserAPIKeyOut) GetLastUsedAt() string {
|
||||
if o == nil || IsNil(o.LastUsedAt) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.LastUsedAt
|
||||
}
|
||||
|
||||
// GetLastUsedAtOk returns a tuple with the LastUsedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *HandlersUserAPIKeyOut) GetLastUsedAtOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.LastUsedAt) {
|
||||
return nil, false
|
||||
}
|
||||
return o.LastUsedAt, true
|
||||
}
|
||||
|
||||
// HasLastUsedAt returns a boolean if a field has been set.
|
||||
func (o *HandlersUserAPIKeyOut) HasLastUsedAt() bool {
|
||||
if o != nil && !IsNil(o.LastUsedAt) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetLastUsedAt gets a reference to the given string and assigns it to the LastUsedAt field.
|
||||
func (o *HandlersUserAPIKeyOut) SetLastUsedAt(v string) {
|
||||
o.LastUsedAt = &v
|
||||
}
|
||||
|
||||
// GetName returns the Name field value if set, zero value otherwise.
|
||||
func (o *HandlersUserAPIKeyOut) GetName() string {
|
||||
if o == nil || IsNil(o.Name) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Name
|
||||
}
|
||||
|
||||
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *HandlersUserAPIKeyOut) GetNameOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Name) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Name, true
|
||||
}
|
||||
|
||||
// HasName returns a boolean if a field has been set.
|
||||
func (o *HandlersUserAPIKeyOut) HasName() bool {
|
||||
if o != nil && !IsNil(o.Name) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetName gets a reference to the given string and assigns it to the Name field.
|
||||
func (o *HandlersUserAPIKeyOut) SetName(v string) {
|
||||
o.Name = &v
|
||||
}
|
||||
|
||||
// GetPlain returns the Plain field value if set, zero value otherwise.
|
||||
func (o *HandlersUserAPIKeyOut) GetPlain() string {
|
||||
if o == nil || IsNil(o.Plain) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Plain
|
||||
}
|
||||
|
||||
// GetPlainOk returns a tuple with the Plain field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *HandlersUserAPIKeyOut) GetPlainOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Plain) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Plain, true
|
||||
}
|
||||
|
||||
// HasPlain returns a boolean if a field has been set.
|
||||
func (o *HandlersUserAPIKeyOut) HasPlain() bool {
|
||||
if o != nil && !IsNil(o.Plain) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPlain gets a reference to the given string and assigns it to the Plain field.
|
||||
func (o *HandlersUserAPIKeyOut) SetPlain(v string) {
|
||||
o.Plain = &v
|
||||
}
|
||||
|
||||
// GetScope returns the Scope field value if set, zero value otherwise.
|
||||
func (o *HandlersUserAPIKeyOut) GetScope() string {
|
||||
if o == nil || IsNil(o.Scope) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Scope
|
||||
}
|
||||
|
||||
// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *HandlersUserAPIKeyOut) GetScopeOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Scope) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Scope, true
|
||||
}
|
||||
|
||||
// HasScope returns a boolean if a field has been set.
|
||||
func (o *HandlersUserAPIKeyOut) HasScope() bool {
|
||||
if o != nil && !IsNil(o.Scope) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetScope gets a reference to the given string and assigns it to the Scope field.
|
||||
func (o *HandlersUserAPIKeyOut) SetScope(v string) {
|
||||
o.Scope = &v
|
||||
}
|
||||
|
||||
func (o HandlersUserAPIKeyOut) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o HandlersUserAPIKeyOut) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.CreatedAt) {
|
||||
toSerialize["created_at"] = o.CreatedAt
|
||||
}
|
||||
if !IsNil(o.ExpiresAt) {
|
||||
toSerialize["expires_at"] = o.ExpiresAt
|
||||
}
|
||||
if !IsNil(o.Id) {
|
||||
toSerialize["id"] = o.Id
|
||||
}
|
||||
if !IsNil(o.LastUsedAt) {
|
||||
toSerialize["last_used_at"] = o.LastUsedAt
|
||||
}
|
||||
if !IsNil(o.Name) {
|
||||
toSerialize["name"] = o.Name
|
||||
}
|
||||
if !IsNil(o.Plain) {
|
||||
toSerialize["plain"] = o.Plain
|
||||
}
|
||||
if !IsNil(o.Scope) {
|
||||
toSerialize["scope"] = o.Scope
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableHandlersUserAPIKeyOut struct {
|
||||
value *HandlersUserAPIKeyOut
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableHandlersUserAPIKeyOut) Get() *HandlersUserAPIKeyOut {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableHandlersUserAPIKeyOut) Set(val *HandlersUserAPIKeyOut) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableHandlersUserAPIKeyOut) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableHandlersUserAPIKeyOut) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableHandlersUserAPIKeyOut(val *HandlersUserAPIKeyOut) *NullableHandlersUserAPIKeyOut {
|
||||
return &NullableHandlersUserAPIKeyOut{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableHandlersUserAPIKeyOut) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableHandlersUserAPIKeyOut) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Reference in New Issue
Block a user