## 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>
323 lines
13 KiB
Go
323 lines
13 KiB
Go
/*
|
|
STACKIT Intake API
|
|
|
|
This API provides endpoints for managing Intakes.
|
|
|
|
API version: 1beta.3.5
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package intakebeta
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the UpdateIntakeRunnerPayload type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &UpdateIntakeRunnerPayload{}
|
|
|
|
/*
|
|
types and functions for description
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type UpdateIntakeRunnerPayloadGetDescriptionAttributeType = *string
|
|
|
|
func getUpdateIntakeRunnerPayloadGetDescriptionAttributeTypeOk(arg UpdateIntakeRunnerPayloadGetDescriptionAttributeType) (ret UpdateIntakeRunnerPayloadGetDescriptionRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setUpdateIntakeRunnerPayloadGetDescriptionAttributeType(arg *UpdateIntakeRunnerPayloadGetDescriptionAttributeType, val UpdateIntakeRunnerPayloadGetDescriptionRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type UpdateIntakeRunnerPayloadGetDescriptionArgType = string
|
|
type UpdateIntakeRunnerPayloadGetDescriptionRetType = string
|
|
|
|
/*
|
|
types and functions for displayName
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type UpdateIntakeRunnerPayloadGetDisplayNameAttributeType = *string
|
|
|
|
func getUpdateIntakeRunnerPayloadGetDisplayNameAttributeTypeOk(arg UpdateIntakeRunnerPayloadGetDisplayNameAttributeType) (ret UpdateIntakeRunnerPayloadGetDisplayNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setUpdateIntakeRunnerPayloadGetDisplayNameAttributeType(arg *UpdateIntakeRunnerPayloadGetDisplayNameAttributeType, val UpdateIntakeRunnerPayloadGetDisplayNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type UpdateIntakeRunnerPayloadGetDisplayNameArgType = string
|
|
type UpdateIntakeRunnerPayloadGetDisplayNameRetType = string
|
|
|
|
/*
|
|
types and functions for labels
|
|
*/
|
|
|
|
// isContainer
|
|
type UpdateIntakeRunnerPayloadGetLabelsAttributeType = *map[string]string
|
|
type UpdateIntakeRunnerPayloadGetLabelsArgType = *map[string]string
|
|
type UpdateIntakeRunnerPayloadGetLabelsRetType = *map[string]string
|
|
|
|
func getUpdateIntakeRunnerPayloadGetLabelsAttributeTypeOk(arg UpdateIntakeRunnerPayloadGetLabelsAttributeType) (ret UpdateIntakeRunnerPayloadGetLabelsRetType, ok bool) {
|
|
if arg == nil {
|
|
return nil, false
|
|
}
|
|
return arg, true
|
|
}
|
|
|
|
func setUpdateIntakeRunnerPayloadGetLabelsAttributeType(arg *UpdateIntakeRunnerPayloadGetLabelsAttributeType, val UpdateIntakeRunnerPayloadGetLabelsRetType) {
|
|
*arg = val
|
|
}
|
|
|
|
/*
|
|
types and functions for maxMessageSizeKiB
|
|
*/
|
|
|
|
// isInteger
|
|
type UpdateIntakeRunnerPayloadGetMaxMessageSizeKiBAttributeType = *int64
|
|
type UpdateIntakeRunnerPayloadGetMaxMessageSizeKiBArgType = int64
|
|
type UpdateIntakeRunnerPayloadGetMaxMessageSizeKiBRetType = int64
|
|
|
|
func getUpdateIntakeRunnerPayloadGetMaxMessageSizeKiBAttributeTypeOk(arg UpdateIntakeRunnerPayloadGetMaxMessageSizeKiBAttributeType) (ret UpdateIntakeRunnerPayloadGetMaxMessageSizeKiBRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setUpdateIntakeRunnerPayloadGetMaxMessageSizeKiBAttributeType(arg *UpdateIntakeRunnerPayloadGetMaxMessageSizeKiBAttributeType, val UpdateIntakeRunnerPayloadGetMaxMessageSizeKiBRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for maxMessagesPerHour
|
|
*/
|
|
|
|
// isInteger
|
|
type UpdateIntakeRunnerPayloadGetMaxMessagesPerHourAttributeType = *int64
|
|
type UpdateIntakeRunnerPayloadGetMaxMessagesPerHourArgType = int64
|
|
type UpdateIntakeRunnerPayloadGetMaxMessagesPerHourRetType = int64
|
|
|
|
func getUpdateIntakeRunnerPayloadGetMaxMessagesPerHourAttributeTypeOk(arg UpdateIntakeRunnerPayloadGetMaxMessagesPerHourAttributeType) (ret UpdateIntakeRunnerPayloadGetMaxMessagesPerHourRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setUpdateIntakeRunnerPayloadGetMaxMessagesPerHourAttributeType(arg *UpdateIntakeRunnerPayloadGetMaxMessagesPerHourAttributeType, val UpdateIntakeRunnerPayloadGetMaxMessagesPerHourRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
// UpdateIntakeRunnerPayload struct for UpdateIntakeRunnerPayload
|
|
type UpdateIntakeRunnerPayload struct {
|
|
// The description is a longer text chosen by the user to provide more context for the resource.
|
|
Description UpdateIntakeRunnerPayloadGetDescriptionAttributeType `json:"description,omitempty"`
|
|
// The display name is a short name chosen by the user to identify the resource.
|
|
DisplayName UpdateIntakeRunnerPayloadGetDisplayNameAttributeType `json:"displayName,omitempty"`
|
|
// Labels are key-value pairs associated with the resource. To update labels: - Provide a new set of key-value pairs to replace the existing labels. - Send empty object `{}` to remove all labels. - Omit this field to leave the labels unchanged.
|
|
Labels UpdateIntakeRunnerPayloadGetLabelsAttributeType `json:"labels,omitempty"`
|
|
// The maximum size of a message in kibibytes (1 KiB = 1024 bytes).
|
|
MaxMessageSizeKiB UpdateIntakeRunnerPayloadGetMaxMessageSizeKiBAttributeType `json:"maxMessageSizeKiB,omitempty"`
|
|
// The maximum number of messages per hour.
|
|
MaxMessagesPerHour UpdateIntakeRunnerPayloadGetMaxMessagesPerHourAttributeType `json:"maxMessagesPerHour,omitempty"`
|
|
}
|
|
|
|
// NewUpdateIntakeRunnerPayload instantiates a new UpdateIntakeRunnerPayload 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 NewUpdateIntakeRunnerPayload() *UpdateIntakeRunnerPayload {
|
|
this := UpdateIntakeRunnerPayload{}
|
|
return &this
|
|
}
|
|
|
|
// NewUpdateIntakeRunnerPayloadWithDefaults instantiates a new UpdateIntakeRunnerPayload 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 NewUpdateIntakeRunnerPayloadWithDefaults() *UpdateIntakeRunnerPayload {
|
|
this := UpdateIntakeRunnerPayload{}
|
|
return &this
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *UpdateIntakeRunnerPayload) GetDescription() (res UpdateIntakeRunnerPayloadGetDescriptionRetType) {
|
|
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 *UpdateIntakeRunnerPayload) GetDescriptionOk() (ret UpdateIntakeRunnerPayloadGetDescriptionRetType, ok bool) {
|
|
return getUpdateIntakeRunnerPayloadGetDescriptionAttributeTypeOk(o.Description)
|
|
}
|
|
|
|
// HasDescription returns a boolean if a field has been set.
|
|
func (o *UpdateIntakeRunnerPayload) HasDescription() bool {
|
|
_, ok := o.GetDescriptionOk()
|
|
return ok
|
|
}
|
|
|
|
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
|
func (o *UpdateIntakeRunnerPayload) SetDescription(v UpdateIntakeRunnerPayloadGetDescriptionRetType) {
|
|
setUpdateIntakeRunnerPayloadGetDescriptionAttributeType(&o.Description, v)
|
|
}
|
|
|
|
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
|
|
func (o *UpdateIntakeRunnerPayload) GetDisplayName() (res UpdateIntakeRunnerPayloadGetDisplayNameRetType) {
|
|
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 *UpdateIntakeRunnerPayload) GetDisplayNameOk() (ret UpdateIntakeRunnerPayloadGetDisplayNameRetType, ok bool) {
|
|
return getUpdateIntakeRunnerPayloadGetDisplayNameAttributeTypeOk(o.DisplayName)
|
|
}
|
|
|
|
// HasDisplayName returns a boolean if a field has been set.
|
|
func (o *UpdateIntakeRunnerPayload) HasDisplayName() bool {
|
|
_, ok := o.GetDisplayNameOk()
|
|
return ok
|
|
}
|
|
|
|
// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
|
|
func (o *UpdateIntakeRunnerPayload) SetDisplayName(v UpdateIntakeRunnerPayloadGetDisplayNameRetType) {
|
|
setUpdateIntakeRunnerPayloadGetDisplayNameAttributeType(&o.DisplayName, v)
|
|
}
|
|
|
|
// GetLabels returns the Labels field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *UpdateIntakeRunnerPayload) GetLabels() (res UpdateIntakeRunnerPayloadGetLabelsRetType) {
|
|
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.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *UpdateIntakeRunnerPayload) GetLabelsOk() (ret UpdateIntakeRunnerPayloadGetLabelsRetType, ok bool) {
|
|
return getUpdateIntakeRunnerPayloadGetLabelsAttributeTypeOk(o.Labels)
|
|
}
|
|
|
|
// HasLabels returns a boolean if a field has been set.
|
|
func (o *UpdateIntakeRunnerPayload) HasLabels() bool {
|
|
_, ok := o.GetLabelsOk()
|
|
return ok
|
|
}
|
|
|
|
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
|
|
func (o *UpdateIntakeRunnerPayload) SetLabels(v UpdateIntakeRunnerPayloadGetLabelsRetType) {
|
|
setUpdateIntakeRunnerPayloadGetLabelsAttributeType(&o.Labels, v)
|
|
}
|
|
|
|
// GetMaxMessageSizeKiB returns the MaxMessageSizeKiB field value if set, zero value otherwise.
|
|
func (o *UpdateIntakeRunnerPayload) GetMaxMessageSizeKiB() (res UpdateIntakeRunnerPayloadGetMaxMessageSizeKiBRetType) {
|
|
res, _ = o.GetMaxMessageSizeKiBOk()
|
|
return
|
|
}
|
|
|
|
// GetMaxMessageSizeKiBOk returns a tuple with the MaxMessageSizeKiB field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *UpdateIntakeRunnerPayload) GetMaxMessageSizeKiBOk() (ret UpdateIntakeRunnerPayloadGetMaxMessageSizeKiBRetType, ok bool) {
|
|
return getUpdateIntakeRunnerPayloadGetMaxMessageSizeKiBAttributeTypeOk(o.MaxMessageSizeKiB)
|
|
}
|
|
|
|
// HasMaxMessageSizeKiB returns a boolean if a field has been set.
|
|
func (o *UpdateIntakeRunnerPayload) HasMaxMessageSizeKiB() bool {
|
|
_, ok := o.GetMaxMessageSizeKiBOk()
|
|
return ok
|
|
}
|
|
|
|
// SetMaxMessageSizeKiB gets a reference to the given int64 and assigns it to the MaxMessageSizeKiB field.
|
|
func (o *UpdateIntakeRunnerPayload) SetMaxMessageSizeKiB(v UpdateIntakeRunnerPayloadGetMaxMessageSizeKiBRetType) {
|
|
setUpdateIntakeRunnerPayloadGetMaxMessageSizeKiBAttributeType(&o.MaxMessageSizeKiB, v)
|
|
}
|
|
|
|
// GetMaxMessagesPerHour returns the MaxMessagesPerHour field value if set, zero value otherwise.
|
|
func (o *UpdateIntakeRunnerPayload) GetMaxMessagesPerHour() (res UpdateIntakeRunnerPayloadGetMaxMessagesPerHourRetType) {
|
|
res, _ = o.GetMaxMessagesPerHourOk()
|
|
return
|
|
}
|
|
|
|
// GetMaxMessagesPerHourOk returns a tuple with the MaxMessagesPerHour field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *UpdateIntakeRunnerPayload) GetMaxMessagesPerHourOk() (ret UpdateIntakeRunnerPayloadGetMaxMessagesPerHourRetType, ok bool) {
|
|
return getUpdateIntakeRunnerPayloadGetMaxMessagesPerHourAttributeTypeOk(o.MaxMessagesPerHour)
|
|
}
|
|
|
|
// HasMaxMessagesPerHour returns a boolean if a field has been set.
|
|
func (o *UpdateIntakeRunnerPayload) HasMaxMessagesPerHour() bool {
|
|
_, ok := o.GetMaxMessagesPerHourOk()
|
|
return ok
|
|
}
|
|
|
|
// SetMaxMessagesPerHour gets a reference to the given int64 and assigns it to the MaxMessagesPerHour field.
|
|
func (o *UpdateIntakeRunnerPayload) SetMaxMessagesPerHour(v UpdateIntakeRunnerPayloadGetMaxMessagesPerHourRetType) {
|
|
setUpdateIntakeRunnerPayloadGetMaxMessagesPerHourAttributeType(&o.MaxMessagesPerHour, v)
|
|
}
|
|
|
|
func (o UpdateIntakeRunnerPayload) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getUpdateIntakeRunnerPayloadGetDescriptionAttributeTypeOk(o.Description); ok {
|
|
toSerialize["Description"] = val
|
|
}
|
|
if val, ok := getUpdateIntakeRunnerPayloadGetDisplayNameAttributeTypeOk(o.DisplayName); ok {
|
|
toSerialize["DisplayName"] = val
|
|
}
|
|
if val, ok := getUpdateIntakeRunnerPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
|
|
toSerialize["Labels"] = val
|
|
}
|
|
if val, ok := getUpdateIntakeRunnerPayloadGetMaxMessageSizeKiBAttributeTypeOk(o.MaxMessageSizeKiB); ok {
|
|
toSerialize["MaxMessageSizeKiB"] = val
|
|
}
|
|
if val, ok := getUpdateIntakeRunnerPayloadGetMaxMessagesPerHourAttributeTypeOk(o.MaxMessagesPerHour); ok {
|
|
toSerialize["MaxMessagesPerHour"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableUpdateIntakeRunnerPayload struct {
|
|
value *UpdateIntakeRunnerPayload
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableUpdateIntakeRunnerPayload) Get() *UpdateIntakeRunnerPayload {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableUpdateIntakeRunnerPayload) Set(val *UpdateIntakeRunnerPayload) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableUpdateIntakeRunnerPayload) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableUpdateIntakeRunnerPayload) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableUpdateIntakeRunnerPayload(val *UpdateIntakeRunnerPayload) *NullableUpdateIntakeRunnerPayload {
|
|
return &NullableUpdateIntakeRunnerPayload{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableUpdateIntakeRunnerPayload) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableUpdateIntakeRunnerPayload) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|