terraform-provider-stackitp.../pkg/logsbeta/model_update_access_token_payload.go
2026-01-21 09:07:29 +01:00

178 lines
6.1 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"
)
// checks if the UpdateAccessTokenPayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UpdateAccessTokenPayload{}
/*
types and functions for description
*/
// isNotNullableString
type UpdateAccessTokenPayloadGetDescriptionAttributeType = *string
func getUpdateAccessTokenPayloadGetDescriptionAttributeTypeOk(arg UpdateAccessTokenPayloadGetDescriptionAttributeType) (ret UpdateAccessTokenPayloadGetDescriptionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateAccessTokenPayloadGetDescriptionAttributeType(arg *UpdateAccessTokenPayloadGetDescriptionAttributeType, val UpdateAccessTokenPayloadGetDescriptionRetType) {
*arg = &val
}
type UpdateAccessTokenPayloadGetDescriptionArgType = string
type UpdateAccessTokenPayloadGetDescriptionRetType = string
/*
types and functions for displayName
*/
// isNotNullableString
type UpdateAccessTokenPayloadGetDisplayNameAttributeType = *string
func getUpdateAccessTokenPayloadGetDisplayNameAttributeTypeOk(arg UpdateAccessTokenPayloadGetDisplayNameAttributeType) (ret UpdateAccessTokenPayloadGetDisplayNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateAccessTokenPayloadGetDisplayNameAttributeType(arg *UpdateAccessTokenPayloadGetDisplayNameAttributeType, val UpdateAccessTokenPayloadGetDisplayNameRetType) {
*arg = &val
}
type UpdateAccessTokenPayloadGetDisplayNameArgType = string
type UpdateAccessTokenPayloadGetDisplayNameRetType = string
// UpdateAccessTokenPayload struct for UpdateAccessTokenPayload
type UpdateAccessTokenPayload struct {
// The description of the access token.
Description UpdateAccessTokenPayloadGetDescriptionAttributeType `json:"description,omitempty"`
// The displayed name of the access token.
DisplayName UpdateAccessTokenPayloadGetDisplayNameAttributeType `json:"displayName,omitempty"`
}
// NewUpdateAccessTokenPayload instantiates a new UpdateAccessTokenPayload 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 NewUpdateAccessTokenPayload() *UpdateAccessTokenPayload {
this := UpdateAccessTokenPayload{}
return &this
}
// NewUpdateAccessTokenPayloadWithDefaults instantiates a new UpdateAccessTokenPayload 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 NewUpdateAccessTokenPayloadWithDefaults() *UpdateAccessTokenPayload {
this := UpdateAccessTokenPayload{}
return &this
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *UpdateAccessTokenPayload) GetDescription() (res UpdateAccessTokenPayloadGetDescriptionRetType) {
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 *UpdateAccessTokenPayload) GetDescriptionOk() (ret UpdateAccessTokenPayloadGetDescriptionRetType, ok bool) {
return getUpdateAccessTokenPayloadGetDescriptionAttributeTypeOk(o.Description)
}
// HasDescription returns a boolean if a field has been set.
func (o *UpdateAccessTokenPayload) HasDescription() bool {
_, ok := o.GetDescriptionOk()
return ok
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *UpdateAccessTokenPayload) SetDescription(v UpdateAccessTokenPayloadGetDescriptionRetType) {
setUpdateAccessTokenPayloadGetDescriptionAttributeType(&o.Description, v)
}
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
func (o *UpdateAccessTokenPayload) GetDisplayName() (res UpdateAccessTokenPayloadGetDisplayNameRetType) {
res, _ = o.GetDisplayNameOk()
return
}
// 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 *UpdateAccessTokenPayload) GetDisplayNameOk() (ret UpdateAccessTokenPayloadGetDisplayNameRetType, ok bool) {
return getUpdateAccessTokenPayloadGetDisplayNameAttributeTypeOk(o.DisplayName)
}
// HasDisplayName returns a boolean if a field has been set.
func (o *UpdateAccessTokenPayload) HasDisplayName() bool {
_, ok := o.GetDisplayNameOk()
return ok
}
// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
func (o *UpdateAccessTokenPayload) SetDisplayName(v UpdateAccessTokenPayloadGetDisplayNameRetType) {
setUpdateAccessTokenPayloadGetDisplayNameAttributeType(&o.DisplayName, v)
}
func (o UpdateAccessTokenPayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getUpdateAccessTokenPayloadGetDescriptionAttributeTypeOk(o.Description); ok {
toSerialize["Description"] = val
}
if val, ok := getUpdateAccessTokenPayloadGetDisplayNameAttributeTypeOk(o.DisplayName); ok {
toSerialize["DisplayName"] = val
}
return toSerialize, nil
}
type NullableUpdateAccessTokenPayload struct {
value *UpdateAccessTokenPayload
isSet bool
}
func (v NullableUpdateAccessTokenPayload) Get() *UpdateAccessTokenPayload {
return v.value
}
func (v *NullableUpdateAccessTokenPayload) Set(val *UpdateAccessTokenPayload) {
v.value = val
v.isSet = true
}
func (v NullableUpdateAccessTokenPayload) IsSet() bool {
return v.isSet
}
func (v *NullableUpdateAccessTokenPayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUpdateAccessTokenPayload(val *UpdateAccessTokenPayload) *NullableUpdateAccessTokenPayload {
return &NullableUpdateAccessTokenPayload{value: val, isSet: true}
}
func (v NullableUpdateAccessTokenPayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUpdateAccessTokenPayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}