600 lines
18 KiB
Go
600 lines
18 KiB
Go
/*
|
|
STACKIT Logs API
|
|
|
|
This API provides endpoints for managing STACKIT Logs.
|
|
|
|
API version: 1beta.0.3
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package logsbeta
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
"time"
|
|
)
|
|
|
|
// checks if the AccessToken type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AccessToken{}
|
|
|
|
/*
|
|
types and functions for accessToken
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type AccessTokenGetAccessTokenAttributeType = *string
|
|
|
|
func getAccessTokenGetAccessTokenAttributeTypeOk(arg AccessTokenGetAccessTokenAttributeType) (ret AccessTokenGetAccessTokenRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setAccessTokenGetAccessTokenAttributeType(arg *AccessTokenGetAccessTokenAttributeType, val AccessTokenGetAccessTokenRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type AccessTokenGetAccessTokenArgType = string
|
|
type AccessTokenGetAccessTokenRetType = string
|
|
|
|
/*
|
|
types and functions for creator
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type AccessTokenGetCreatorAttributeType = *string
|
|
|
|
func getAccessTokenGetCreatorAttributeTypeOk(arg AccessTokenGetCreatorAttributeType) (ret AccessTokenGetCreatorRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setAccessTokenGetCreatorAttributeType(arg *AccessTokenGetCreatorAttributeType, val AccessTokenGetCreatorRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type AccessTokenGetCreatorArgType = string
|
|
type AccessTokenGetCreatorRetType = string
|
|
|
|
/*
|
|
types and functions for description
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type AccessTokenGetDescriptionAttributeType = *string
|
|
|
|
func getAccessTokenGetDescriptionAttributeTypeOk(arg AccessTokenGetDescriptionAttributeType) (ret AccessTokenGetDescriptionRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setAccessTokenGetDescriptionAttributeType(arg *AccessTokenGetDescriptionAttributeType, val AccessTokenGetDescriptionRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type AccessTokenGetDescriptionArgType = string
|
|
type AccessTokenGetDescriptionRetType = string
|
|
|
|
/*
|
|
types and functions for displayName
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type AccessTokenGetDisplayNameAttributeType = *string
|
|
|
|
func getAccessTokenGetDisplayNameAttributeTypeOk(arg AccessTokenGetDisplayNameAttributeType) (ret AccessTokenGetDisplayNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setAccessTokenGetDisplayNameAttributeType(arg *AccessTokenGetDisplayNameAttributeType, val AccessTokenGetDisplayNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type AccessTokenGetDisplayNameArgType = string
|
|
type AccessTokenGetDisplayNameRetType = string
|
|
|
|
/*
|
|
types and functions for expires
|
|
*/
|
|
|
|
// isBoolean
|
|
type AccessTokengetExpiresAttributeType = *bool
|
|
type AccessTokengetExpiresArgType = bool
|
|
type AccessTokengetExpiresRetType = bool
|
|
|
|
func getAccessTokengetExpiresAttributeTypeOk(arg AccessTokengetExpiresAttributeType) (ret AccessTokengetExpiresRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setAccessTokengetExpiresAttributeType(arg *AccessTokengetExpiresAttributeType, val AccessTokengetExpiresRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for id
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type AccessTokenGetIdAttributeType = *string
|
|
|
|
func getAccessTokenGetIdAttributeTypeOk(arg AccessTokenGetIdAttributeType) (ret AccessTokenGetIdRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setAccessTokenGetIdAttributeType(arg *AccessTokenGetIdAttributeType, val AccessTokenGetIdRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type AccessTokenGetIdArgType = string
|
|
type AccessTokenGetIdRetType = string
|
|
|
|
/*
|
|
types and functions for permissions
|
|
*/
|
|
|
|
// isArray
|
|
type AccessTokenGetPermissionsAttributeType = *[]string
|
|
type AccessTokenGetPermissionsArgType = []string
|
|
type AccessTokenGetPermissionsRetType = []string
|
|
|
|
func getAccessTokenGetPermissionsAttributeTypeOk(arg AccessTokenGetPermissionsAttributeType) (ret AccessTokenGetPermissionsRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setAccessTokenGetPermissionsAttributeType(arg *AccessTokenGetPermissionsAttributeType, val AccessTokenGetPermissionsRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for status
|
|
*/
|
|
|
|
// isEnum
|
|
|
|
// AccessTokenStatus the model 'AccessToken'
|
|
// value type for enums
|
|
type AccessTokenStatus string
|
|
|
|
// List of Status
|
|
const (
|
|
ACCESSTOKENSTATUS_ACTIVE AccessTokenStatus = "active"
|
|
ACCESSTOKENSTATUS_EXPIRED AccessTokenStatus = "expired"
|
|
)
|
|
|
|
// All allowed values of AccessToken enum
|
|
var AllowedAccessTokenStatusEnumValues = []AccessTokenStatus{
|
|
"active",
|
|
"expired",
|
|
}
|
|
|
|
func (v *AccessTokenStatus) UnmarshalJSON(src []byte) error {
|
|
// use a type alias to prevent infinite recursion during unmarshal,
|
|
// see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers
|
|
type TmpJson AccessTokenStatus
|
|
var value TmpJson
|
|
err := json.Unmarshal(src, &value)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
// Allow unmarshalling zero value for testing purposes
|
|
var zeroValue TmpJson
|
|
if value == zeroValue {
|
|
return nil
|
|
}
|
|
enumTypeValue := AccessTokenStatus(value)
|
|
for _, existing := range AllowedAccessTokenStatusEnumValues {
|
|
if existing == enumTypeValue {
|
|
*v = enumTypeValue
|
|
return nil
|
|
}
|
|
}
|
|
|
|
return fmt.Errorf("%+v is not a valid AccessToken", value)
|
|
}
|
|
|
|
// NewAccessTokenStatusFromValue returns a pointer to a valid AccessTokenStatus
|
|
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
|
func NewAccessTokenStatusFromValue(v AccessTokenStatus) (*AccessTokenStatus, error) {
|
|
ev := AccessTokenStatus(v)
|
|
if ev.IsValid() {
|
|
return &ev, nil
|
|
} else {
|
|
return nil, fmt.Errorf("invalid value '%v' for AccessTokenStatus: valid values are %v", v, AllowedAccessTokenStatusEnumValues)
|
|
}
|
|
}
|
|
|
|
// IsValid return true if the value is valid for the enum, false otherwise
|
|
func (v AccessTokenStatus) IsValid() bool {
|
|
for _, existing := range AllowedAccessTokenStatusEnumValues {
|
|
if existing == v {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|
|
|
|
// Ptr returns reference to StatusStatus value
|
|
func (v AccessTokenStatus) Ptr() *AccessTokenStatus {
|
|
return &v
|
|
}
|
|
|
|
type NullableAccessTokenStatus struct {
|
|
value *AccessTokenStatus
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAccessTokenStatus) Get() *AccessTokenStatus {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAccessTokenStatus) Set(val *AccessTokenStatus) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAccessTokenStatus) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAccessTokenStatus) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAccessTokenStatus(val *AccessTokenStatus) *NullableAccessTokenStatus {
|
|
return &NullableAccessTokenStatus{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAccessTokenStatus) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAccessTokenStatus) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
type AccessTokenGetStatusAttributeType = *AccessTokenStatus
|
|
type AccessTokenGetStatusArgType = AccessTokenStatus
|
|
type AccessTokenGetStatusRetType = AccessTokenStatus
|
|
|
|
func getAccessTokenGetStatusAttributeTypeOk(arg AccessTokenGetStatusAttributeType) (ret AccessTokenGetStatusRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setAccessTokenGetStatusAttributeType(arg *AccessTokenGetStatusAttributeType, val AccessTokenGetStatusRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for validUntil
|
|
*/
|
|
|
|
// isDateTime
|
|
type AccessTokenGetValidUntilAttributeType = *time.Time
|
|
type AccessTokenGetValidUntilArgType = time.Time
|
|
type AccessTokenGetValidUntilRetType = time.Time
|
|
|
|
func getAccessTokenGetValidUntilAttributeTypeOk(arg AccessTokenGetValidUntilAttributeType) (ret AccessTokenGetValidUntilRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setAccessTokenGetValidUntilAttributeType(arg *AccessTokenGetValidUntilAttributeType, val AccessTokenGetValidUntilRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
// AccessToken struct for AccessToken
|
|
type AccessToken struct {
|
|
// A generated access token. Only available on creation.
|
|
AccessToken AccessTokenGetAccessTokenAttributeType `json:"accessToken,omitempty"`
|
|
// The user who created the access token.
|
|
// REQUIRED
|
|
Creator AccessTokenGetCreatorAttributeType `json:"creator" required:"true"`
|
|
// The description of the access token.
|
|
Description AccessTokenGetDescriptionAttributeType `json:"description,omitempty"`
|
|
// The displayed name of the access token.
|
|
// REQUIRED
|
|
DisplayName AccessTokenGetDisplayNameAttributeType `json:"displayName" required:"true"`
|
|
// Indicates if the access token can expire.
|
|
// REQUIRED
|
|
Expires AccessTokengetExpiresAttributeType `json:"expires" required:"true"`
|
|
// An auto generated unique id which identifies the access token.
|
|
// REQUIRED
|
|
Id AccessTokenGetIdAttributeType `json:"id" required:"true"`
|
|
// The access permissions granted to the access token.
|
|
// REQUIRED
|
|
Permissions AccessTokenGetPermissionsAttributeType `json:"permissions" required:"true"`
|
|
// REQUIRED
|
|
Status AccessTokenGetStatusAttributeType `json:"status" required:"true"`
|
|
// The date and time util an access token is valid to (inclusively).
|
|
ValidUntil AccessTokenGetValidUntilAttributeType `json:"validUntil,omitempty"`
|
|
}
|
|
|
|
type _AccessToken AccessToken
|
|
|
|
// NewAccessToken instantiates a new AccessToken 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 NewAccessToken(creator AccessTokenGetCreatorArgType, displayName AccessTokenGetDisplayNameArgType, expires AccessTokengetExpiresArgType, id AccessTokenGetIdArgType, permissions AccessTokenGetPermissionsArgType, status AccessTokenGetStatusArgType) *AccessToken {
|
|
this := AccessToken{}
|
|
setAccessTokenGetCreatorAttributeType(&this.Creator, creator)
|
|
setAccessTokenGetDisplayNameAttributeType(&this.DisplayName, displayName)
|
|
setAccessTokengetExpiresAttributeType(&this.Expires, expires)
|
|
setAccessTokenGetIdAttributeType(&this.Id, id)
|
|
setAccessTokenGetPermissionsAttributeType(&this.Permissions, permissions)
|
|
setAccessTokenGetStatusAttributeType(&this.Status, status)
|
|
return &this
|
|
}
|
|
|
|
// NewAccessTokenWithDefaults instantiates a new AccessToken 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 NewAccessTokenWithDefaults() *AccessToken {
|
|
this := AccessToken{}
|
|
return &this
|
|
}
|
|
|
|
// GetAccessToken returns the AccessToken field value if set, zero value otherwise.
|
|
func (o *AccessToken) GetAccessToken() (res AccessTokenGetAccessTokenRetType) {
|
|
res, _ = o.GetAccessTokenOk()
|
|
return
|
|
}
|
|
|
|
// GetAccessTokenOk returns a tuple with the AccessToken field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AccessToken) GetAccessTokenOk() (ret AccessTokenGetAccessTokenRetType, ok bool) {
|
|
return getAccessTokenGetAccessTokenAttributeTypeOk(o.AccessToken)
|
|
}
|
|
|
|
// HasAccessToken returns a boolean if a field has been set.
|
|
func (o *AccessToken) HasAccessToken() bool {
|
|
_, ok := o.GetAccessTokenOk()
|
|
return ok
|
|
}
|
|
|
|
// SetAccessToken gets a reference to the given string and assigns it to the AccessToken field.
|
|
func (o *AccessToken) SetAccessToken(v AccessTokenGetAccessTokenRetType) {
|
|
setAccessTokenGetAccessTokenAttributeType(&o.AccessToken, v)
|
|
}
|
|
|
|
// GetCreator returns the Creator field value
|
|
func (o *AccessToken) GetCreator() (ret AccessTokenGetCreatorRetType) {
|
|
ret, _ = o.GetCreatorOk()
|
|
return ret
|
|
}
|
|
|
|
// GetCreatorOk returns a tuple with the Creator field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AccessToken) GetCreatorOk() (ret AccessTokenGetCreatorRetType, ok bool) {
|
|
return getAccessTokenGetCreatorAttributeTypeOk(o.Creator)
|
|
}
|
|
|
|
// SetCreator sets field value
|
|
func (o *AccessToken) SetCreator(v AccessTokenGetCreatorRetType) {
|
|
setAccessTokenGetCreatorAttributeType(&o.Creator, v)
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *AccessToken) GetDescription() (res AccessTokenGetDescriptionRetType) {
|
|
res, _ = o.GetDescriptionOk()
|
|
return
|
|
}
|
|
|
|
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AccessToken) GetDescriptionOk() (ret AccessTokenGetDescriptionRetType, ok bool) {
|
|
return getAccessTokenGetDescriptionAttributeTypeOk(o.Description)
|
|
}
|
|
|
|
// HasDescription returns a boolean if a field has been set.
|
|
func (o *AccessToken) HasDescription() bool {
|
|
_, ok := o.GetDescriptionOk()
|
|
return ok
|
|
}
|
|
|
|
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
|
func (o *AccessToken) SetDescription(v AccessTokenGetDescriptionRetType) {
|
|
setAccessTokenGetDescriptionAttributeType(&o.Description, v)
|
|
}
|
|
|
|
// GetDisplayName returns the DisplayName field value
|
|
func (o *AccessToken) GetDisplayName() (ret AccessTokenGetDisplayNameRetType) {
|
|
ret, _ = o.GetDisplayNameOk()
|
|
return ret
|
|
}
|
|
|
|
// GetDisplayNameOk returns a tuple with the DisplayName field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AccessToken) GetDisplayNameOk() (ret AccessTokenGetDisplayNameRetType, ok bool) {
|
|
return getAccessTokenGetDisplayNameAttributeTypeOk(o.DisplayName)
|
|
}
|
|
|
|
// SetDisplayName sets field value
|
|
func (o *AccessToken) SetDisplayName(v AccessTokenGetDisplayNameRetType) {
|
|
setAccessTokenGetDisplayNameAttributeType(&o.DisplayName, v)
|
|
}
|
|
|
|
// GetExpires returns the Expires field value
|
|
func (o *AccessToken) GetExpires() (ret AccessTokengetExpiresRetType) {
|
|
ret, _ = o.GetExpiresOk()
|
|
return ret
|
|
}
|
|
|
|
// GetExpiresOk returns a tuple with the Expires field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AccessToken) GetExpiresOk() (ret AccessTokengetExpiresRetType, ok bool) {
|
|
return getAccessTokengetExpiresAttributeTypeOk(o.Expires)
|
|
}
|
|
|
|
// SetExpires sets field value
|
|
func (o *AccessToken) SetExpires(v AccessTokengetExpiresRetType) {
|
|
setAccessTokengetExpiresAttributeType(&o.Expires, v)
|
|
}
|
|
|
|
// GetId returns the Id field value
|
|
func (o *AccessToken) GetId() (ret AccessTokenGetIdRetType) {
|
|
ret, _ = o.GetIdOk()
|
|
return ret
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AccessToken) GetIdOk() (ret AccessTokenGetIdRetType, ok bool) {
|
|
return getAccessTokenGetIdAttributeTypeOk(o.Id)
|
|
}
|
|
|
|
// SetId sets field value
|
|
func (o *AccessToken) SetId(v AccessTokenGetIdRetType) {
|
|
setAccessTokenGetIdAttributeType(&o.Id, v)
|
|
}
|
|
|
|
// GetPermissions returns the Permissions field value
|
|
func (o *AccessToken) GetPermissions() (ret AccessTokenGetPermissionsRetType) {
|
|
ret, _ = o.GetPermissionsOk()
|
|
return ret
|
|
}
|
|
|
|
// GetPermissionsOk returns a tuple with the Permissions field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AccessToken) GetPermissionsOk() (ret AccessTokenGetPermissionsRetType, ok bool) {
|
|
return getAccessTokenGetPermissionsAttributeTypeOk(o.Permissions)
|
|
}
|
|
|
|
// SetPermissions sets field value
|
|
func (o *AccessToken) SetPermissions(v AccessTokenGetPermissionsRetType) {
|
|
setAccessTokenGetPermissionsAttributeType(&o.Permissions, v)
|
|
}
|
|
|
|
// GetStatus returns the Status field value
|
|
func (o *AccessToken) GetStatus() (ret AccessTokenGetStatusRetType) {
|
|
ret, _ = o.GetStatusOk()
|
|
return ret
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AccessToken) GetStatusOk() (ret AccessTokenGetStatusRetType, ok bool) {
|
|
return getAccessTokenGetStatusAttributeTypeOk(o.Status)
|
|
}
|
|
|
|
// SetStatus sets field value
|
|
func (o *AccessToken) SetStatus(v AccessTokenGetStatusRetType) {
|
|
setAccessTokenGetStatusAttributeType(&o.Status, v)
|
|
}
|
|
|
|
// GetValidUntil returns the ValidUntil field value if set, zero value otherwise.
|
|
func (o *AccessToken) GetValidUntil() (res AccessTokenGetValidUntilRetType) {
|
|
res, _ = o.GetValidUntilOk()
|
|
return
|
|
}
|
|
|
|
// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AccessToken) GetValidUntilOk() (ret AccessTokenGetValidUntilRetType, ok bool) {
|
|
return getAccessTokenGetValidUntilAttributeTypeOk(o.ValidUntil)
|
|
}
|
|
|
|
// HasValidUntil returns a boolean if a field has been set.
|
|
func (o *AccessToken) HasValidUntil() bool {
|
|
_, ok := o.GetValidUntilOk()
|
|
return ok
|
|
}
|
|
|
|
// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field.
|
|
func (o *AccessToken) SetValidUntil(v AccessTokenGetValidUntilRetType) {
|
|
setAccessTokenGetValidUntilAttributeType(&o.ValidUntil, v)
|
|
}
|
|
|
|
func (o AccessToken) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getAccessTokenGetAccessTokenAttributeTypeOk(o.AccessToken); ok {
|
|
toSerialize["AccessToken"] = val
|
|
}
|
|
if val, ok := getAccessTokenGetCreatorAttributeTypeOk(o.Creator); ok {
|
|
toSerialize["Creator"] = val
|
|
}
|
|
if val, ok := getAccessTokenGetDescriptionAttributeTypeOk(o.Description); ok {
|
|
toSerialize["Description"] = val
|
|
}
|
|
if val, ok := getAccessTokenGetDisplayNameAttributeTypeOk(o.DisplayName); ok {
|
|
toSerialize["DisplayName"] = val
|
|
}
|
|
if val, ok := getAccessTokengetExpiresAttributeTypeOk(o.Expires); ok {
|
|
toSerialize["Expires"] = val
|
|
}
|
|
if val, ok := getAccessTokenGetIdAttributeTypeOk(o.Id); ok {
|
|
toSerialize["Id"] = val
|
|
}
|
|
if val, ok := getAccessTokenGetPermissionsAttributeTypeOk(o.Permissions); ok {
|
|
toSerialize["Permissions"] = val
|
|
}
|
|
if val, ok := getAccessTokenGetStatusAttributeTypeOk(o.Status); ok {
|
|
toSerialize["Status"] = val
|
|
}
|
|
if val, ok := getAccessTokenGetValidUntilAttributeTypeOk(o.ValidUntil); ok {
|
|
toSerialize["ValidUntil"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableAccessToken struct {
|
|
value *AccessToken
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAccessToken) Get() *AccessToken {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAccessToken) Set(val *AccessToken) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAccessToken) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAccessToken) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAccessToken(val *AccessToken) *NullableAccessToken {
|
|
return &NullableAccessToken{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAccessToken) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAccessToken) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|