terraform-provider-stackitp.../pkg/intakebeta/model_update_intake_payload.go
2026-01-21 09:07:29 +01:00

321 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 UpdateIntakePayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UpdateIntakePayload{}
/*
types and functions for catalog
*/
// isModel
type UpdateIntakePayloadGetCatalogAttributeType = *IntakeCatalogPatch
type UpdateIntakePayloadGetCatalogArgType = IntakeCatalogPatch
type UpdateIntakePayloadGetCatalogRetType = IntakeCatalogPatch
func getUpdateIntakePayloadGetCatalogAttributeTypeOk(arg UpdateIntakePayloadGetCatalogAttributeType) (ret UpdateIntakePayloadGetCatalogRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateIntakePayloadGetCatalogAttributeType(arg *UpdateIntakePayloadGetCatalogAttributeType, val UpdateIntakePayloadGetCatalogRetType) {
*arg = &val
}
/*
types and functions for description
*/
// isNotNullableString
type UpdateIntakePayloadGetDescriptionAttributeType = *string
func getUpdateIntakePayloadGetDescriptionAttributeTypeOk(arg UpdateIntakePayloadGetDescriptionAttributeType) (ret UpdateIntakePayloadGetDescriptionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateIntakePayloadGetDescriptionAttributeType(arg *UpdateIntakePayloadGetDescriptionAttributeType, val UpdateIntakePayloadGetDescriptionRetType) {
*arg = &val
}
type UpdateIntakePayloadGetDescriptionArgType = string
type UpdateIntakePayloadGetDescriptionRetType = string
/*
types and functions for displayName
*/
// isNotNullableString
type UpdateIntakePayloadGetDisplayNameAttributeType = *string
func getUpdateIntakePayloadGetDisplayNameAttributeTypeOk(arg UpdateIntakePayloadGetDisplayNameAttributeType) (ret UpdateIntakePayloadGetDisplayNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateIntakePayloadGetDisplayNameAttributeType(arg *UpdateIntakePayloadGetDisplayNameAttributeType, val UpdateIntakePayloadGetDisplayNameRetType) {
*arg = &val
}
type UpdateIntakePayloadGetDisplayNameArgType = string
type UpdateIntakePayloadGetDisplayNameRetType = string
/*
types and functions for intakeRunnerId
*/
// isNotNullableString
type UpdateIntakePayloadGetIntakeRunnerIdAttributeType = *string
func getUpdateIntakePayloadGetIntakeRunnerIdAttributeTypeOk(arg UpdateIntakePayloadGetIntakeRunnerIdAttributeType) (ret UpdateIntakePayloadGetIntakeRunnerIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateIntakePayloadGetIntakeRunnerIdAttributeType(arg *UpdateIntakePayloadGetIntakeRunnerIdAttributeType, val UpdateIntakePayloadGetIntakeRunnerIdRetType) {
*arg = &val
}
type UpdateIntakePayloadGetIntakeRunnerIdArgType = string
type UpdateIntakePayloadGetIntakeRunnerIdRetType = string
/*
types and functions for labels
*/
// isContainer
type UpdateIntakePayloadGetLabelsAttributeType = *map[string]string
type UpdateIntakePayloadGetLabelsArgType = *map[string]string
type UpdateIntakePayloadGetLabelsRetType = *map[string]string
func getUpdateIntakePayloadGetLabelsAttributeTypeOk(arg UpdateIntakePayloadGetLabelsAttributeType) (ret UpdateIntakePayloadGetLabelsRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg, true
}
func setUpdateIntakePayloadGetLabelsAttributeType(arg *UpdateIntakePayloadGetLabelsAttributeType, val UpdateIntakePayloadGetLabelsRetType) {
*arg = val
}
// UpdateIntakePayload struct for UpdateIntakePayload
type UpdateIntakePayload struct {
Catalog UpdateIntakePayloadGetCatalogAttributeType `json:"catalog,omitempty"`
// The description is a longer text chosen by the user to provide more context for the resource.
Description UpdateIntakePayloadGetDescriptionAttributeType `json:"description,omitempty"`
// The display name is a short name chosen by the user to identify the resource.
DisplayName UpdateIntakePayloadGetDisplayNameAttributeType `json:"displayName,omitempty"`
// The unique id of the intake runner this intake should run on.
// REQUIRED
IntakeRunnerId UpdateIntakePayloadGetIntakeRunnerIdAttributeType `json:"intakeRunnerId" required:"true"`
// 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 UpdateIntakePayloadGetLabelsAttributeType `json:"labels,omitempty"`
}
type _UpdateIntakePayload UpdateIntakePayload
// NewUpdateIntakePayload instantiates a new UpdateIntakePayload 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 NewUpdateIntakePayload(intakeRunnerId UpdateIntakePayloadGetIntakeRunnerIdArgType) *UpdateIntakePayload {
this := UpdateIntakePayload{}
setUpdateIntakePayloadGetIntakeRunnerIdAttributeType(&this.IntakeRunnerId, intakeRunnerId)
return &this
}
// NewUpdateIntakePayloadWithDefaults instantiates a new UpdateIntakePayload 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 NewUpdateIntakePayloadWithDefaults() *UpdateIntakePayload {
this := UpdateIntakePayload{}
return &this
}
// GetCatalog returns the Catalog field value if set, zero value otherwise.
func (o *UpdateIntakePayload) GetCatalog() (res UpdateIntakePayloadGetCatalogRetType) {
res, _ = o.GetCatalogOk()
return
}
// GetCatalogOk returns a tuple with the Catalog field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateIntakePayload) GetCatalogOk() (ret UpdateIntakePayloadGetCatalogRetType, ok bool) {
return getUpdateIntakePayloadGetCatalogAttributeTypeOk(o.Catalog)
}
// HasCatalog returns a boolean if a field has been set.
func (o *UpdateIntakePayload) HasCatalog() bool {
_, ok := o.GetCatalogOk()
return ok
}
// SetCatalog gets a reference to the given IntakeCatalogPatch and assigns it to the Catalog field.
func (o *UpdateIntakePayload) SetCatalog(v UpdateIntakePayloadGetCatalogRetType) {
setUpdateIntakePayloadGetCatalogAttributeType(&o.Catalog, v)
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *UpdateIntakePayload) GetDescription() (res UpdateIntakePayloadGetDescriptionRetType) {
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 *UpdateIntakePayload) GetDescriptionOk() (ret UpdateIntakePayloadGetDescriptionRetType, ok bool) {
return getUpdateIntakePayloadGetDescriptionAttributeTypeOk(o.Description)
}
// HasDescription returns a boolean if a field has been set.
func (o *UpdateIntakePayload) HasDescription() bool {
_, ok := o.GetDescriptionOk()
return ok
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *UpdateIntakePayload) SetDescription(v UpdateIntakePayloadGetDescriptionRetType) {
setUpdateIntakePayloadGetDescriptionAttributeType(&o.Description, v)
}
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
func (o *UpdateIntakePayload) GetDisplayName() (res UpdateIntakePayloadGetDisplayNameRetType) {
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 *UpdateIntakePayload) GetDisplayNameOk() (ret UpdateIntakePayloadGetDisplayNameRetType, ok bool) {
return getUpdateIntakePayloadGetDisplayNameAttributeTypeOk(o.DisplayName)
}
// HasDisplayName returns a boolean if a field has been set.
func (o *UpdateIntakePayload) HasDisplayName() bool {
_, ok := o.GetDisplayNameOk()
return ok
}
// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
func (o *UpdateIntakePayload) SetDisplayName(v UpdateIntakePayloadGetDisplayNameRetType) {
setUpdateIntakePayloadGetDisplayNameAttributeType(&o.DisplayName, v)
}
// GetIntakeRunnerId returns the IntakeRunnerId field value
func (o *UpdateIntakePayload) GetIntakeRunnerId() (ret UpdateIntakePayloadGetIntakeRunnerIdRetType) {
ret, _ = o.GetIntakeRunnerIdOk()
return ret
}
// GetIntakeRunnerIdOk returns a tuple with the IntakeRunnerId field value
// and a boolean to check if the value has been set.
func (o *UpdateIntakePayload) GetIntakeRunnerIdOk() (ret UpdateIntakePayloadGetIntakeRunnerIdRetType, ok bool) {
return getUpdateIntakePayloadGetIntakeRunnerIdAttributeTypeOk(o.IntakeRunnerId)
}
// SetIntakeRunnerId sets field value
func (o *UpdateIntakePayload) SetIntakeRunnerId(v UpdateIntakePayloadGetIntakeRunnerIdRetType) {
setUpdateIntakePayloadGetIntakeRunnerIdAttributeType(&o.IntakeRunnerId, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UpdateIntakePayload) GetLabels() (res UpdateIntakePayloadGetLabelsRetType) {
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 *UpdateIntakePayload) GetLabelsOk() (ret UpdateIntakePayloadGetLabelsRetType, ok bool) {
return getUpdateIntakePayloadGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *UpdateIntakePayload) 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 *UpdateIntakePayload) SetLabels(v UpdateIntakePayloadGetLabelsRetType) {
setUpdateIntakePayloadGetLabelsAttributeType(&o.Labels, v)
}
func (o UpdateIntakePayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getUpdateIntakePayloadGetCatalogAttributeTypeOk(o.Catalog); ok {
toSerialize["Catalog"] = val
}
if val, ok := getUpdateIntakePayloadGetDescriptionAttributeTypeOk(o.Description); ok {
toSerialize["Description"] = val
}
if val, ok := getUpdateIntakePayloadGetDisplayNameAttributeTypeOk(o.DisplayName); ok {
toSerialize["DisplayName"] = val
}
if val, ok := getUpdateIntakePayloadGetIntakeRunnerIdAttributeTypeOk(o.IntakeRunnerId); ok {
toSerialize["IntakeRunnerId"] = val
}
if val, ok := getUpdateIntakePayloadGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
return toSerialize, nil
}
type NullableUpdateIntakePayload struct {
value *UpdateIntakePayload
isSet bool
}
func (v NullableUpdateIntakePayload) Get() *UpdateIntakePayload {
return v.value
}
func (v *NullableUpdateIntakePayload) Set(val *UpdateIntakePayload) {
v.value = val
v.isSet = true
}
func (v NullableUpdateIntakePayload) IsSet() bool {
return v.isSet
}
func (v *NullableUpdateIntakePayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUpdateIntakePayload(val *UpdateIntakePayload) *NullableUpdateIntakePayload {
return &NullableUpdateIntakePayload{value: val, isSet: true}
}
func (v NullableUpdateIntakePayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUpdateIntakePayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}