## 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>
128 lines
4.1 KiB
Go
128 lines
4.1 KiB
Go
/*
|
|
STACKIT IaaS API
|
|
|
|
This API allows you to create and modify IaaS resources.
|
|
|
|
API version: 2beta1
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package iaasbeta
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the UpdateKeyPairPayload type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &UpdateKeyPairPayload{}
|
|
|
|
/*
|
|
types and functions for labels
|
|
*/
|
|
|
|
// isFreeform
|
|
type UpdateKeyPairPayloadGetLabelsAttributeType = *map[string]interface{}
|
|
type UpdateKeyPairPayloadGetLabelsArgType = map[string]interface{}
|
|
type UpdateKeyPairPayloadGetLabelsRetType = map[string]interface{}
|
|
|
|
func getUpdateKeyPairPayloadGetLabelsAttributeTypeOk(arg UpdateKeyPairPayloadGetLabelsAttributeType) (ret UpdateKeyPairPayloadGetLabelsRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setUpdateKeyPairPayloadGetLabelsAttributeType(arg *UpdateKeyPairPayloadGetLabelsAttributeType, val UpdateKeyPairPayloadGetLabelsRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
// UpdateKeyPairPayload Object that represents an update request body of a public key of an SSH keypair.
|
|
type UpdateKeyPairPayload struct {
|
|
// Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.
|
|
Labels UpdateKeyPairPayloadGetLabelsAttributeType `json:"labels,omitempty"`
|
|
}
|
|
|
|
// NewUpdateKeyPairPayload instantiates a new UpdateKeyPairPayload 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 NewUpdateKeyPairPayload() *UpdateKeyPairPayload {
|
|
this := UpdateKeyPairPayload{}
|
|
return &this
|
|
}
|
|
|
|
// NewUpdateKeyPairPayloadWithDefaults instantiates a new UpdateKeyPairPayload 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 NewUpdateKeyPairPayloadWithDefaults() *UpdateKeyPairPayload {
|
|
this := UpdateKeyPairPayload{}
|
|
return &this
|
|
}
|
|
|
|
// GetLabels returns the Labels field value if set, zero value otherwise.
|
|
func (o *UpdateKeyPairPayload) GetLabels() (res UpdateKeyPairPayloadGetLabelsRetType) {
|
|
res, _ = o.GetLabelsOk()
|
|
return
|
|
}
|
|
|
|
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *UpdateKeyPairPayload) GetLabelsOk() (ret UpdateKeyPairPayloadGetLabelsRetType, ok bool) {
|
|
return getUpdateKeyPairPayloadGetLabelsAttributeTypeOk(o.Labels)
|
|
}
|
|
|
|
// HasLabels returns a boolean if a field has been set.
|
|
func (o *UpdateKeyPairPayload) HasLabels() bool {
|
|
_, ok := o.GetLabelsOk()
|
|
return ok
|
|
}
|
|
|
|
// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field.
|
|
func (o *UpdateKeyPairPayload) SetLabels(v UpdateKeyPairPayloadGetLabelsRetType) {
|
|
setUpdateKeyPairPayloadGetLabelsAttributeType(&o.Labels, v)
|
|
}
|
|
|
|
func (o UpdateKeyPairPayload) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getUpdateKeyPairPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
|
|
toSerialize["Labels"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableUpdateKeyPairPayload struct {
|
|
value *UpdateKeyPairPayload
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableUpdateKeyPairPayload) Get() *UpdateKeyPairPayload {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableUpdateKeyPairPayload) Set(val *UpdateKeyPairPayload) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableUpdateKeyPairPayload) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableUpdateKeyPairPayload) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableUpdateKeyPairPayload(val *UpdateKeyPairPayload) *NullableUpdateKeyPairPayload {
|
|
return &NullableUpdateKeyPairPayload{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableUpdateKeyPairPayload) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableUpdateKeyPairPayload) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|