## 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>
178 lines
6.1 KiB
Go
178 lines
6.1 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 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)
|
|
}
|