mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 12:50:05 +01:00
feat: sdk migration in progress
This commit is contained in:
160
sdk/go/model_handlers_org_key_create_req.go
Normal file
160
sdk/go/model_handlers_org_key_create_req.go
Normal file
@@ -0,0 +1,160 @@
|
||||
/*
|
||||
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 HandlersOrgKeyCreateReq type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &HandlersOrgKeyCreateReq{}
|
||||
|
||||
// HandlersOrgKeyCreateReq struct for HandlersOrgKeyCreateReq
|
||||
type HandlersOrgKeyCreateReq struct {
|
||||
ExpiresInHours *int32 `json:"expires_in_hours,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// NewHandlersOrgKeyCreateReq instantiates a new HandlersOrgKeyCreateReq 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 NewHandlersOrgKeyCreateReq() *HandlersOrgKeyCreateReq {
|
||||
this := HandlersOrgKeyCreateReq{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewHandlersOrgKeyCreateReqWithDefaults instantiates a new HandlersOrgKeyCreateReq 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 NewHandlersOrgKeyCreateReqWithDefaults() *HandlersOrgKeyCreateReq {
|
||||
this := HandlersOrgKeyCreateReq{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetExpiresInHours returns the ExpiresInHours field value if set, zero value otherwise.
|
||||
func (o *HandlersOrgKeyCreateReq) GetExpiresInHours() int32 {
|
||||
if o == nil || IsNil(o.ExpiresInHours) {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.ExpiresInHours
|
||||
}
|
||||
|
||||
// GetExpiresInHoursOk returns a tuple with the ExpiresInHours field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *HandlersOrgKeyCreateReq) GetExpiresInHoursOk() (*int32, bool) {
|
||||
if o == nil || IsNil(o.ExpiresInHours) {
|
||||
return nil, false
|
||||
}
|
||||
return o.ExpiresInHours, true
|
||||
}
|
||||
|
||||
// HasExpiresInHours returns a boolean if a field has been set.
|
||||
func (o *HandlersOrgKeyCreateReq) HasExpiresInHours() bool {
|
||||
if o != nil && !IsNil(o.ExpiresInHours) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetExpiresInHours gets a reference to the given int32 and assigns it to the ExpiresInHours field.
|
||||
func (o *HandlersOrgKeyCreateReq) SetExpiresInHours(v int32) {
|
||||
o.ExpiresInHours = &v
|
||||
}
|
||||
|
||||
// GetName returns the Name field value if set, zero value otherwise.
|
||||
func (o *HandlersOrgKeyCreateReq) 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 *HandlersOrgKeyCreateReq) 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 *HandlersOrgKeyCreateReq) 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 *HandlersOrgKeyCreateReq) SetName(v string) {
|
||||
o.Name = &v
|
||||
}
|
||||
|
||||
func (o HandlersOrgKeyCreateReq) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o HandlersOrgKeyCreateReq) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.ExpiresInHours) {
|
||||
toSerialize["expires_in_hours"] = o.ExpiresInHours
|
||||
}
|
||||
if !IsNil(o.Name) {
|
||||
toSerialize["name"] = o.Name
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableHandlersOrgKeyCreateReq struct {
|
||||
value *HandlersOrgKeyCreateReq
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableHandlersOrgKeyCreateReq) Get() *HandlersOrgKeyCreateReq {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableHandlersOrgKeyCreateReq) Set(val *HandlersOrgKeyCreateReq) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableHandlersOrgKeyCreateReq) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableHandlersOrgKeyCreateReq) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableHandlersOrgKeyCreateReq(val *HandlersOrgKeyCreateReq) *NullableHandlersOrgKeyCreateReq {
|
||||
return &NullableHandlersOrgKeyCreateReq{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableHandlersOrgKeyCreateReq) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableHandlersOrgKeyCreateReq) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Reference in New Issue
Block a user