terraform-provider-stackitp.../pkg/logsalpha/model_create_access_token_payload.go
Marcel S. Henselin 9f41c4da7f
Some checks failed
Publish / Check GoReleaser config (push) Successful in 4s
Release / goreleaser (push) Failing after 29s
Publish / Publish provider (push) Failing after 4m24s
feat: auto generated files and new structure (#4)
## Description

<!-- **Please link some issue here describing what you are trying to achieve.**

In case there is no issue present for your PR, please consider creating one.
At least please give us some description what you are trying to achieve and why your change is needed. -->

relates to #1234

## Checklist

- [ ] Issue was linked above
- [ ] Code format was applied: `make fmt`
- [ ] Examples were added / adjusted (see `examples/` directory)
- [x] Docs are up-to-date: `make generate-docs` (will be checked by CI)
- [ ] Unit tests got implemented or updated
- [ ] Acceptance tests got implemented or updated (see e.g. [here](f5f99d1709/stackit/internal/services/dns/dns_acc_test.go))
- [x] Unit tests are passing: `make test` (will be checked by CI)
- [x] No linter issues: `make lint` (will be checked by CI)

Reviewed-on: #4
Reviewed-by: Andre_Harms <andre.harms@stackit.cloud>
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-committed-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
2026-01-29 14:10:25 +00:00

269 lines
9.8 KiB
Go

/*
STACKIT Logs API
This API provides endpoints for managing STACKIT Logs.
API version: 1alpha.0.3
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package logsalpha
import (
"encoding/json"
)
// checks if the CreateAccessTokenPayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateAccessTokenPayload{}
/*
types and functions for description
*/
// isNotNullableString
type CreateAccessTokenPayloadGetDescriptionAttributeType = *string
func getCreateAccessTokenPayloadGetDescriptionAttributeTypeOk(arg CreateAccessTokenPayloadGetDescriptionAttributeType) (ret CreateAccessTokenPayloadGetDescriptionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateAccessTokenPayloadGetDescriptionAttributeType(arg *CreateAccessTokenPayloadGetDescriptionAttributeType, val CreateAccessTokenPayloadGetDescriptionRetType) {
*arg = &val
}
type CreateAccessTokenPayloadGetDescriptionArgType = string
type CreateAccessTokenPayloadGetDescriptionRetType = string
/*
types and functions for displayName
*/
// isNotNullableString
type CreateAccessTokenPayloadGetDisplayNameAttributeType = *string
func getCreateAccessTokenPayloadGetDisplayNameAttributeTypeOk(arg CreateAccessTokenPayloadGetDisplayNameAttributeType) (ret CreateAccessTokenPayloadGetDisplayNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateAccessTokenPayloadGetDisplayNameAttributeType(arg *CreateAccessTokenPayloadGetDisplayNameAttributeType, val CreateAccessTokenPayloadGetDisplayNameRetType) {
*arg = &val
}
type CreateAccessTokenPayloadGetDisplayNameArgType = string
type CreateAccessTokenPayloadGetDisplayNameRetType = string
/*
types and functions for lifetime
*/
// isInteger
type CreateAccessTokenPayloadGetLifetimeAttributeType = *int64
type CreateAccessTokenPayloadGetLifetimeArgType = int64
type CreateAccessTokenPayloadGetLifetimeRetType = int64
func getCreateAccessTokenPayloadGetLifetimeAttributeTypeOk(arg CreateAccessTokenPayloadGetLifetimeAttributeType) (ret CreateAccessTokenPayloadGetLifetimeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateAccessTokenPayloadGetLifetimeAttributeType(arg *CreateAccessTokenPayloadGetLifetimeAttributeType, val CreateAccessTokenPayloadGetLifetimeRetType) {
*arg = &val
}
/*
types and functions for permissions
*/
// isArray
type CreateAccessTokenPayloadGetPermissionsAttributeType = *[]string
type CreateAccessTokenPayloadGetPermissionsArgType = []string
type CreateAccessTokenPayloadGetPermissionsRetType = []string
func getCreateAccessTokenPayloadGetPermissionsAttributeTypeOk(arg CreateAccessTokenPayloadGetPermissionsAttributeType) (ret CreateAccessTokenPayloadGetPermissionsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateAccessTokenPayloadGetPermissionsAttributeType(arg *CreateAccessTokenPayloadGetPermissionsAttributeType, val CreateAccessTokenPayloadGetPermissionsRetType) {
*arg = &val
}
// CreateAccessTokenPayload struct for CreateAccessTokenPayload
type CreateAccessTokenPayload struct {
// The description of the access token.
Description CreateAccessTokenPayloadGetDescriptionAttributeType `json:"description,omitempty"`
// The displayed name of the access token.
// REQUIRED
DisplayName CreateAccessTokenPayloadGetDisplayNameAttributeType `json:"displayName" required:"true"`
// A lifetime period for an access token in days. If unset the token will not expire.
// Can be cast to int32 without loss of precision.
Lifetime CreateAccessTokenPayloadGetLifetimeAttributeType `json:"lifetime,omitempty"`
// The access permissions granted to the access token.
// REQUIRED
Permissions CreateAccessTokenPayloadGetPermissionsAttributeType `json:"permissions" required:"true"`
}
type _CreateAccessTokenPayload CreateAccessTokenPayload
// NewCreateAccessTokenPayload instantiates a new CreateAccessTokenPayload 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 NewCreateAccessTokenPayload(displayName CreateAccessTokenPayloadGetDisplayNameArgType, permissions CreateAccessTokenPayloadGetPermissionsArgType) *CreateAccessTokenPayload {
this := CreateAccessTokenPayload{}
setCreateAccessTokenPayloadGetDisplayNameAttributeType(&this.DisplayName, displayName)
setCreateAccessTokenPayloadGetPermissionsAttributeType(&this.Permissions, permissions)
return &this
}
// NewCreateAccessTokenPayloadWithDefaults instantiates a new CreateAccessTokenPayload 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 NewCreateAccessTokenPayloadWithDefaults() *CreateAccessTokenPayload {
this := CreateAccessTokenPayload{}
return &this
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *CreateAccessTokenPayload) GetDescription() (res CreateAccessTokenPayloadGetDescriptionRetType) {
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 *CreateAccessTokenPayload) GetDescriptionOk() (ret CreateAccessTokenPayloadGetDescriptionRetType, ok bool) {
return getCreateAccessTokenPayloadGetDescriptionAttributeTypeOk(o.Description)
}
// HasDescription returns a boolean if a field has been set.
func (o *CreateAccessTokenPayload) HasDescription() bool {
_, ok := o.GetDescriptionOk()
return ok
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *CreateAccessTokenPayload) SetDescription(v CreateAccessTokenPayloadGetDescriptionRetType) {
setCreateAccessTokenPayloadGetDescriptionAttributeType(&o.Description, v)
}
// GetDisplayName returns the DisplayName field value
func (o *CreateAccessTokenPayload) GetDisplayName() (ret CreateAccessTokenPayloadGetDisplayNameRetType) {
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 *CreateAccessTokenPayload) GetDisplayNameOk() (ret CreateAccessTokenPayloadGetDisplayNameRetType, ok bool) {
return getCreateAccessTokenPayloadGetDisplayNameAttributeTypeOk(o.DisplayName)
}
// SetDisplayName sets field value
func (o *CreateAccessTokenPayload) SetDisplayName(v CreateAccessTokenPayloadGetDisplayNameRetType) {
setCreateAccessTokenPayloadGetDisplayNameAttributeType(&o.DisplayName, v)
}
// GetLifetime returns the Lifetime field value if set, zero value otherwise.
func (o *CreateAccessTokenPayload) GetLifetime() (res CreateAccessTokenPayloadGetLifetimeRetType) {
res, _ = o.GetLifetimeOk()
return
}
// GetLifetimeOk returns a tuple with the Lifetime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateAccessTokenPayload) GetLifetimeOk() (ret CreateAccessTokenPayloadGetLifetimeRetType, ok bool) {
return getCreateAccessTokenPayloadGetLifetimeAttributeTypeOk(o.Lifetime)
}
// HasLifetime returns a boolean if a field has been set.
func (o *CreateAccessTokenPayload) HasLifetime() bool {
_, ok := o.GetLifetimeOk()
return ok
}
// SetLifetime gets a reference to the given int64 and assigns it to the Lifetime field.
func (o *CreateAccessTokenPayload) SetLifetime(v CreateAccessTokenPayloadGetLifetimeRetType) {
setCreateAccessTokenPayloadGetLifetimeAttributeType(&o.Lifetime, v)
}
// GetPermissions returns the Permissions field value
func (o *CreateAccessTokenPayload) GetPermissions() (ret CreateAccessTokenPayloadGetPermissionsRetType) {
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 *CreateAccessTokenPayload) GetPermissionsOk() (ret CreateAccessTokenPayloadGetPermissionsRetType, ok bool) {
return getCreateAccessTokenPayloadGetPermissionsAttributeTypeOk(o.Permissions)
}
// SetPermissions sets field value
func (o *CreateAccessTokenPayload) SetPermissions(v CreateAccessTokenPayloadGetPermissionsRetType) {
setCreateAccessTokenPayloadGetPermissionsAttributeType(&o.Permissions, v)
}
func (o CreateAccessTokenPayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getCreateAccessTokenPayloadGetDescriptionAttributeTypeOk(o.Description); ok {
toSerialize["Description"] = val
}
if val, ok := getCreateAccessTokenPayloadGetDisplayNameAttributeTypeOk(o.DisplayName); ok {
toSerialize["DisplayName"] = val
}
if val, ok := getCreateAccessTokenPayloadGetLifetimeAttributeTypeOk(o.Lifetime); ok {
toSerialize["Lifetime"] = val
}
if val, ok := getCreateAccessTokenPayloadGetPermissionsAttributeTypeOk(o.Permissions); ok {
toSerialize["Permissions"] = val
}
return toSerialize, nil
}
type NullableCreateAccessTokenPayload struct {
value *CreateAccessTokenPayload
isSet bool
}
func (v NullableCreateAccessTokenPayload) Get() *CreateAccessTokenPayload {
return v.value
}
func (v *NullableCreateAccessTokenPayload) Set(val *CreateAccessTokenPayload) {
v.value = val
v.isSet = true
}
func (v NullableCreateAccessTokenPayload) IsSet() bool {
return v.isSet
}
func (v *NullableCreateAccessTokenPayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateAccessTokenPayload(val *CreateAccessTokenPayload) *NullableCreateAccessTokenPayload {
return &NullableCreateAccessTokenPayload{value: val, isSet: true}
}
func (v NullableCreateAccessTokenPayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateAccessTokenPayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}