## 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>
313 lines
12 KiB
Go
313 lines
12 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 CreateIntakeRunnerPayload type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &CreateIntakeRunnerPayload{}
|
|
|
|
/*
|
|
types and functions for description
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CreateIntakeRunnerPayloadGetDescriptionAttributeType = *string
|
|
|
|
func getCreateIntakeRunnerPayloadGetDescriptionAttributeTypeOk(arg CreateIntakeRunnerPayloadGetDescriptionAttributeType) (ret CreateIntakeRunnerPayloadGetDescriptionRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateIntakeRunnerPayloadGetDescriptionAttributeType(arg *CreateIntakeRunnerPayloadGetDescriptionAttributeType, val CreateIntakeRunnerPayloadGetDescriptionRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CreateIntakeRunnerPayloadGetDescriptionArgType = string
|
|
type CreateIntakeRunnerPayloadGetDescriptionRetType = string
|
|
|
|
/*
|
|
types and functions for displayName
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CreateIntakeRunnerPayloadGetDisplayNameAttributeType = *string
|
|
|
|
func getCreateIntakeRunnerPayloadGetDisplayNameAttributeTypeOk(arg CreateIntakeRunnerPayloadGetDisplayNameAttributeType) (ret CreateIntakeRunnerPayloadGetDisplayNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateIntakeRunnerPayloadGetDisplayNameAttributeType(arg *CreateIntakeRunnerPayloadGetDisplayNameAttributeType, val CreateIntakeRunnerPayloadGetDisplayNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CreateIntakeRunnerPayloadGetDisplayNameArgType = string
|
|
type CreateIntakeRunnerPayloadGetDisplayNameRetType = string
|
|
|
|
/*
|
|
types and functions for labels
|
|
*/
|
|
|
|
// isContainer
|
|
type CreateIntakeRunnerPayloadGetLabelsAttributeType = *map[string]string
|
|
type CreateIntakeRunnerPayloadGetLabelsArgType = *map[string]string
|
|
type CreateIntakeRunnerPayloadGetLabelsRetType = *map[string]string
|
|
|
|
func getCreateIntakeRunnerPayloadGetLabelsAttributeTypeOk(arg CreateIntakeRunnerPayloadGetLabelsAttributeType) (ret CreateIntakeRunnerPayloadGetLabelsRetType, ok bool) {
|
|
if arg == nil {
|
|
return nil, false
|
|
}
|
|
return arg, true
|
|
}
|
|
|
|
func setCreateIntakeRunnerPayloadGetLabelsAttributeType(arg *CreateIntakeRunnerPayloadGetLabelsAttributeType, val CreateIntakeRunnerPayloadGetLabelsRetType) {
|
|
*arg = val
|
|
}
|
|
|
|
/*
|
|
types and functions for maxMessageSizeKiB
|
|
*/
|
|
|
|
// isInteger
|
|
type CreateIntakeRunnerPayloadGetMaxMessageSizeKiBAttributeType = *int64
|
|
type CreateIntakeRunnerPayloadGetMaxMessageSizeKiBArgType = int64
|
|
type CreateIntakeRunnerPayloadGetMaxMessageSizeKiBRetType = int64
|
|
|
|
func getCreateIntakeRunnerPayloadGetMaxMessageSizeKiBAttributeTypeOk(arg CreateIntakeRunnerPayloadGetMaxMessageSizeKiBAttributeType) (ret CreateIntakeRunnerPayloadGetMaxMessageSizeKiBRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateIntakeRunnerPayloadGetMaxMessageSizeKiBAttributeType(arg *CreateIntakeRunnerPayloadGetMaxMessageSizeKiBAttributeType, val CreateIntakeRunnerPayloadGetMaxMessageSizeKiBRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for maxMessagesPerHour
|
|
*/
|
|
|
|
// isInteger
|
|
type CreateIntakeRunnerPayloadGetMaxMessagesPerHourAttributeType = *int64
|
|
type CreateIntakeRunnerPayloadGetMaxMessagesPerHourArgType = int64
|
|
type CreateIntakeRunnerPayloadGetMaxMessagesPerHourRetType = int64
|
|
|
|
func getCreateIntakeRunnerPayloadGetMaxMessagesPerHourAttributeTypeOk(arg CreateIntakeRunnerPayloadGetMaxMessagesPerHourAttributeType) (ret CreateIntakeRunnerPayloadGetMaxMessagesPerHourRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateIntakeRunnerPayloadGetMaxMessagesPerHourAttributeType(arg *CreateIntakeRunnerPayloadGetMaxMessagesPerHourAttributeType, val CreateIntakeRunnerPayloadGetMaxMessagesPerHourRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
// CreateIntakeRunnerPayload struct for CreateIntakeRunnerPayload
|
|
type CreateIntakeRunnerPayload struct {
|
|
// The description is a longer text chosen by the user to provide more context for the resource.
|
|
Description CreateIntakeRunnerPayloadGetDescriptionAttributeType `json:"description,omitempty"`
|
|
// The display name is a short name chosen by the user to identify the resource.
|
|
// REQUIRED
|
|
DisplayName CreateIntakeRunnerPayloadGetDisplayNameAttributeType `json:"displayName" required:"true"`
|
|
// Labels are a set of key-value pairs assigned to resources.
|
|
Labels CreateIntakeRunnerPayloadGetLabelsAttributeType `json:"labels,omitempty"`
|
|
// The maximum size of a message in kibibytes (1 KiB = 1024 bytes).
|
|
// REQUIRED
|
|
MaxMessageSizeKiB CreateIntakeRunnerPayloadGetMaxMessageSizeKiBAttributeType `json:"maxMessageSizeKiB" required:"true"`
|
|
// The maximum number of messages per hour.
|
|
// REQUIRED
|
|
MaxMessagesPerHour CreateIntakeRunnerPayloadGetMaxMessagesPerHourAttributeType `json:"maxMessagesPerHour" required:"true"`
|
|
}
|
|
|
|
type _CreateIntakeRunnerPayload CreateIntakeRunnerPayload
|
|
|
|
// NewCreateIntakeRunnerPayload instantiates a new CreateIntakeRunnerPayload 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 NewCreateIntakeRunnerPayload(displayName CreateIntakeRunnerPayloadGetDisplayNameArgType, maxMessageSizeKiB CreateIntakeRunnerPayloadGetMaxMessageSizeKiBArgType, maxMessagesPerHour CreateIntakeRunnerPayloadGetMaxMessagesPerHourArgType) *CreateIntakeRunnerPayload {
|
|
this := CreateIntakeRunnerPayload{}
|
|
setCreateIntakeRunnerPayloadGetDisplayNameAttributeType(&this.DisplayName, displayName)
|
|
setCreateIntakeRunnerPayloadGetMaxMessageSizeKiBAttributeType(&this.MaxMessageSizeKiB, maxMessageSizeKiB)
|
|
setCreateIntakeRunnerPayloadGetMaxMessagesPerHourAttributeType(&this.MaxMessagesPerHour, maxMessagesPerHour)
|
|
return &this
|
|
}
|
|
|
|
// NewCreateIntakeRunnerPayloadWithDefaults instantiates a new CreateIntakeRunnerPayload 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 NewCreateIntakeRunnerPayloadWithDefaults() *CreateIntakeRunnerPayload {
|
|
this := CreateIntakeRunnerPayload{}
|
|
return &this
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *CreateIntakeRunnerPayload) GetDescription() (res CreateIntakeRunnerPayloadGetDescriptionRetType) {
|
|
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 *CreateIntakeRunnerPayload) GetDescriptionOk() (ret CreateIntakeRunnerPayloadGetDescriptionRetType, ok bool) {
|
|
return getCreateIntakeRunnerPayloadGetDescriptionAttributeTypeOk(o.Description)
|
|
}
|
|
|
|
// HasDescription returns a boolean if a field has been set.
|
|
func (o *CreateIntakeRunnerPayload) HasDescription() bool {
|
|
_, ok := o.GetDescriptionOk()
|
|
return ok
|
|
}
|
|
|
|
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
|
func (o *CreateIntakeRunnerPayload) SetDescription(v CreateIntakeRunnerPayloadGetDescriptionRetType) {
|
|
setCreateIntakeRunnerPayloadGetDescriptionAttributeType(&o.Description, v)
|
|
}
|
|
|
|
// GetDisplayName returns the DisplayName field value
|
|
func (o *CreateIntakeRunnerPayload) GetDisplayName() (ret CreateIntakeRunnerPayloadGetDisplayNameRetType) {
|
|
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 *CreateIntakeRunnerPayload) GetDisplayNameOk() (ret CreateIntakeRunnerPayloadGetDisplayNameRetType, ok bool) {
|
|
return getCreateIntakeRunnerPayloadGetDisplayNameAttributeTypeOk(o.DisplayName)
|
|
}
|
|
|
|
// SetDisplayName sets field value
|
|
func (o *CreateIntakeRunnerPayload) SetDisplayName(v CreateIntakeRunnerPayloadGetDisplayNameRetType) {
|
|
setCreateIntakeRunnerPayloadGetDisplayNameAttributeType(&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 *CreateIntakeRunnerPayload) GetLabels() (res CreateIntakeRunnerPayloadGetLabelsRetType) {
|
|
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 *CreateIntakeRunnerPayload) GetLabelsOk() (ret CreateIntakeRunnerPayloadGetLabelsRetType, ok bool) {
|
|
return getCreateIntakeRunnerPayloadGetLabelsAttributeTypeOk(o.Labels)
|
|
}
|
|
|
|
// HasLabels returns a boolean if a field has been set.
|
|
func (o *CreateIntakeRunnerPayload) 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 *CreateIntakeRunnerPayload) SetLabels(v CreateIntakeRunnerPayloadGetLabelsRetType) {
|
|
setCreateIntakeRunnerPayloadGetLabelsAttributeType(&o.Labels, v)
|
|
}
|
|
|
|
// GetMaxMessageSizeKiB returns the MaxMessageSizeKiB field value
|
|
func (o *CreateIntakeRunnerPayload) GetMaxMessageSizeKiB() (ret CreateIntakeRunnerPayloadGetMaxMessageSizeKiBRetType) {
|
|
ret, _ = o.GetMaxMessageSizeKiBOk()
|
|
return ret
|
|
}
|
|
|
|
// GetMaxMessageSizeKiBOk returns a tuple with the MaxMessageSizeKiB field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CreateIntakeRunnerPayload) GetMaxMessageSizeKiBOk() (ret CreateIntakeRunnerPayloadGetMaxMessageSizeKiBRetType, ok bool) {
|
|
return getCreateIntakeRunnerPayloadGetMaxMessageSizeKiBAttributeTypeOk(o.MaxMessageSizeKiB)
|
|
}
|
|
|
|
// SetMaxMessageSizeKiB sets field value
|
|
func (o *CreateIntakeRunnerPayload) SetMaxMessageSizeKiB(v CreateIntakeRunnerPayloadGetMaxMessageSizeKiBRetType) {
|
|
setCreateIntakeRunnerPayloadGetMaxMessageSizeKiBAttributeType(&o.MaxMessageSizeKiB, v)
|
|
}
|
|
|
|
// GetMaxMessagesPerHour returns the MaxMessagesPerHour field value
|
|
func (o *CreateIntakeRunnerPayload) GetMaxMessagesPerHour() (ret CreateIntakeRunnerPayloadGetMaxMessagesPerHourRetType) {
|
|
ret, _ = o.GetMaxMessagesPerHourOk()
|
|
return ret
|
|
}
|
|
|
|
// GetMaxMessagesPerHourOk returns a tuple with the MaxMessagesPerHour field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CreateIntakeRunnerPayload) GetMaxMessagesPerHourOk() (ret CreateIntakeRunnerPayloadGetMaxMessagesPerHourRetType, ok bool) {
|
|
return getCreateIntakeRunnerPayloadGetMaxMessagesPerHourAttributeTypeOk(o.MaxMessagesPerHour)
|
|
}
|
|
|
|
// SetMaxMessagesPerHour sets field value
|
|
func (o *CreateIntakeRunnerPayload) SetMaxMessagesPerHour(v CreateIntakeRunnerPayloadGetMaxMessagesPerHourRetType) {
|
|
setCreateIntakeRunnerPayloadGetMaxMessagesPerHourAttributeType(&o.MaxMessagesPerHour, v)
|
|
}
|
|
|
|
func (o CreateIntakeRunnerPayload) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getCreateIntakeRunnerPayloadGetDescriptionAttributeTypeOk(o.Description); ok {
|
|
toSerialize["Description"] = val
|
|
}
|
|
if val, ok := getCreateIntakeRunnerPayloadGetDisplayNameAttributeTypeOk(o.DisplayName); ok {
|
|
toSerialize["DisplayName"] = val
|
|
}
|
|
if val, ok := getCreateIntakeRunnerPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
|
|
toSerialize["Labels"] = val
|
|
}
|
|
if val, ok := getCreateIntakeRunnerPayloadGetMaxMessageSizeKiBAttributeTypeOk(o.MaxMessageSizeKiB); ok {
|
|
toSerialize["MaxMessageSizeKiB"] = val
|
|
}
|
|
if val, ok := getCreateIntakeRunnerPayloadGetMaxMessagesPerHourAttributeTypeOk(o.MaxMessagesPerHour); ok {
|
|
toSerialize["MaxMessagesPerHour"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableCreateIntakeRunnerPayload struct {
|
|
value *CreateIntakeRunnerPayload
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableCreateIntakeRunnerPayload) Get() *CreateIntakeRunnerPayload {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableCreateIntakeRunnerPayload) Set(val *CreateIntakeRunnerPayload) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableCreateIntakeRunnerPayload) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableCreateIntakeRunnerPayload) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableCreateIntakeRunnerPayload(val *CreateIntakeRunnerPayload) *NullableCreateIntakeRunnerPayload {
|
|
return &NullableCreateIntakeRunnerPayload{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableCreateIntakeRunnerPayload) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableCreateIntakeRunnerPayload) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|