/* 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 CreateIntakePayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateIntakePayload{} /* types and functions for catalog */ // isModel type CreateIntakePayloadGetCatalogAttributeType = *IntakeCatalog type CreateIntakePayloadGetCatalogArgType = IntakeCatalog type CreateIntakePayloadGetCatalogRetType = IntakeCatalog func getCreateIntakePayloadGetCatalogAttributeTypeOk(arg CreateIntakePayloadGetCatalogAttributeType) (ret CreateIntakePayloadGetCatalogRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCreateIntakePayloadGetCatalogAttributeType(arg *CreateIntakePayloadGetCatalogAttributeType, val CreateIntakePayloadGetCatalogRetType) { *arg = &val } /* types and functions for description */ // isNotNullableString type CreateIntakePayloadGetDescriptionAttributeType = *string func getCreateIntakePayloadGetDescriptionAttributeTypeOk(arg CreateIntakePayloadGetDescriptionAttributeType) (ret CreateIntakePayloadGetDescriptionRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCreateIntakePayloadGetDescriptionAttributeType(arg *CreateIntakePayloadGetDescriptionAttributeType, val CreateIntakePayloadGetDescriptionRetType) { *arg = &val } type CreateIntakePayloadGetDescriptionArgType = string type CreateIntakePayloadGetDescriptionRetType = string /* types and functions for displayName */ // isNotNullableString type CreateIntakePayloadGetDisplayNameAttributeType = *string func getCreateIntakePayloadGetDisplayNameAttributeTypeOk(arg CreateIntakePayloadGetDisplayNameAttributeType) (ret CreateIntakePayloadGetDisplayNameRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCreateIntakePayloadGetDisplayNameAttributeType(arg *CreateIntakePayloadGetDisplayNameAttributeType, val CreateIntakePayloadGetDisplayNameRetType) { *arg = &val } type CreateIntakePayloadGetDisplayNameArgType = string type CreateIntakePayloadGetDisplayNameRetType = string /* types and functions for intakeRunnerId */ // isNotNullableString type CreateIntakePayloadGetIntakeRunnerIdAttributeType = *string func getCreateIntakePayloadGetIntakeRunnerIdAttributeTypeOk(arg CreateIntakePayloadGetIntakeRunnerIdAttributeType) (ret CreateIntakePayloadGetIntakeRunnerIdRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCreateIntakePayloadGetIntakeRunnerIdAttributeType(arg *CreateIntakePayloadGetIntakeRunnerIdAttributeType, val CreateIntakePayloadGetIntakeRunnerIdRetType) { *arg = &val } type CreateIntakePayloadGetIntakeRunnerIdArgType = string type CreateIntakePayloadGetIntakeRunnerIdRetType = string /* types and functions for labels */ // isContainer type CreateIntakePayloadGetLabelsAttributeType = *map[string]string type CreateIntakePayloadGetLabelsArgType = *map[string]string type CreateIntakePayloadGetLabelsRetType = *map[string]string func getCreateIntakePayloadGetLabelsAttributeTypeOk(arg CreateIntakePayloadGetLabelsAttributeType) (ret CreateIntakePayloadGetLabelsRetType, ok bool) { if arg == nil { return nil, false } return arg, true } func setCreateIntakePayloadGetLabelsAttributeType(arg *CreateIntakePayloadGetLabelsAttributeType, val CreateIntakePayloadGetLabelsRetType) { *arg = val } // CreateIntakePayload struct for CreateIntakePayload type CreateIntakePayload struct { // REQUIRED Catalog CreateIntakePayloadGetCatalogAttributeType `json:"catalog" required:"true"` // The description is a longer text chosen by the user to provide more context for the resource. Description CreateIntakePayloadGetDescriptionAttributeType `json:"description,omitempty"` // The display name is a short name chosen by the user to identify the resource. // REQUIRED DisplayName CreateIntakePayloadGetDisplayNameAttributeType `json:"displayName" required:"true"` // The unique id of the intake runner this intake should run on. // REQUIRED IntakeRunnerId CreateIntakePayloadGetIntakeRunnerIdAttributeType `json:"intakeRunnerId" required:"true"` // Labels are a set of key-value pairs assigned to resources. Labels CreateIntakePayloadGetLabelsAttributeType `json:"labels,omitempty"` } type _CreateIntakePayload CreateIntakePayload // NewCreateIntakePayload instantiates a new CreateIntakePayload 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 NewCreateIntakePayload(catalog CreateIntakePayloadGetCatalogArgType, displayName CreateIntakePayloadGetDisplayNameArgType, intakeRunnerId CreateIntakePayloadGetIntakeRunnerIdArgType) *CreateIntakePayload { this := CreateIntakePayload{} setCreateIntakePayloadGetCatalogAttributeType(&this.Catalog, catalog) setCreateIntakePayloadGetDisplayNameAttributeType(&this.DisplayName, displayName) setCreateIntakePayloadGetIntakeRunnerIdAttributeType(&this.IntakeRunnerId, intakeRunnerId) return &this } // NewCreateIntakePayloadWithDefaults instantiates a new CreateIntakePayload 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 NewCreateIntakePayloadWithDefaults() *CreateIntakePayload { this := CreateIntakePayload{} return &this } // GetCatalog returns the Catalog field value func (o *CreateIntakePayload) GetCatalog() (ret CreateIntakePayloadGetCatalogRetType) { ret, _ = o.GetCatalogOk() return ret } // GetCatalogOk returns a tuple with the Catalog field value // and a boolean to check if the value has been set. func (o *CreateIntakePayload) GetCatalogOk() (ret CreateIntakePayloadGetCatalogRetType, ok bool) { return getCreateIntakePayloadGetCatalogAttributeTypeOk(o.Catalog) } // SetCatalog sets field value func (o *CreateIntakePayload) SetCatalog(v CreateIntakePayloadGetCatalogRetType) { setCreateIntakePayloadGetCatalogAttributeType(&o.Catalog, v) } // GetDescription returns the Description field value if set, zero value otherwise. func (o *CreateIntakePayload) GetDescription() (res CreateIntakePayloadGetDescriptionRetType) { 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 *CreateIntakePayload) GetDescriptionOk() (ret CreateIntakePayloadGetDescriptionRetType, ok bool) { return getCreateIntakePayloadGetDescriptionAttributeTypeOk(o.Description) } // HasDescription returns a boolean if a field has been set. func (o *CreateIntakePayload) HasDescription() bool { _, ok := o.GetDescriptionOk() return ok } // SetDescription gets a reference to the given string and assigns it to the Description field. func (o *CreateIntakePayload) SetDescription(v CreateIntakePayloadGetDescriptionRetType) { setCreateIntakePayloadGetDescriptionAttributeType(&o.Description, v) } // GetDisplayName returns the DisplayName field value func (o *CreateIntakePayload) GetDisplayName() (ret CreateIntakePayloadGetDisplayNameRetType) { 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 *CreateIntakePayload) GetDisplayNameOk() (ret CreateIntakePayloadGetDisplayNameRetType, ok bool) { return getCreateIntakePayloadGetDisplayNameAttributeTypeOk(o.DisplayName) } // SetDisplayName sets field value func (o *CreateIntakePayload) SetDisplayName(v CreateIntakePayloadGetDisplayNameRetType) { setCreateIntakePayloadGetDisplayNameAttributeType(&o.DisplayName, v) } // GetIntakeRunnerId returns the IntakeRunnerId field value func (o *CreateIntakePayload) GetIntakeRunnerId() (ret CreateIntakePayloadGetIntakeRunnerIdRetType) { 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 *CreateIntakePayload) GetIntakeRunnerIdOk() (ret CreateIntakePayloadGetIntakeRunnerIdRetType, ok bool) { return getCreateIntakePayloadGetIntakeRunnerIdAttributeTypeOk(o.IntakeRunnerId) } // SetIntakeRunnerId sets field value func (o *CreateIntakePayload) SetIntakeRunnerId(v CreateIntakePayloadGetIntakeRunnerIdRetType) { setCreateIntakePayloadGetIntakeRunnerIdAttributeType(&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 *CreateIntakePayload) GetLabels() (res CreateIntakePayloadGetLabelsRetType) { 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 *CreateIntakePayload) GetLabelsOk() (ret CreateIntakePayloadGetLabelsRetType, ok bool) { return getCreateIntakePayloadGetLabelsAttributeTypeOk(o.Labels) } // HasLabels returns a boolean if a field has been set. func (o *CreateIntakePayload) 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 *CreateIntakePayload) SetLabels(v CreateIntakePayloadGetLabelsRetType) { setCreateIntakePayloadGetLabelsAttributeType(&o.Labels, v) } func (o CreateIntakePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateIntakePayloadGetCatalogAttributeTypeOk(o.Catalog); ok { toSerialize["Catalog"] = val } if val, ok := getCreateIntakePayloadGetDescriptionAttributeTypeOk(o.Description); ok { toSerialize["Description"] = val } if val, ok := getCreateIntakePayloadGetDisplayNameAttributeTypeOk(o.DisplayName); ok { toSerialize["DisplayName"] = val } if val, ok := getCreateIntakePayloadGetIntakeRunnerIdAttributeTypeOk(o.IntakeRunnerId); ok { toSerialize["IntakeRunnerId"] = val } if val, ok := getCreateIntakePayloadGetLabelsAttributeTypeOk(o.Labels); ok { toSerialize["Labels"] = val } return toSerialize, nil } type NullableCreateIntakePayload struct { value *CreateIntakePayload isSet bool } func (v NullableCreateIntakePayload) Get() *CreateIntakePayload { return v.value } func (v *NullableCreateIntakePayload) Set(val *CreateIntakePayload) { v.value = val v.isSet = true } func (v NullableCreateIntakePayload) IsSet() bool { return v.isSet } func (v *NullableCreateIntakePayload) Unset() { v.value = nil v.isSet = false } func NewNullableCreateIntakePayload(val *CreateIntakePayload) *NullableCreateIntakePayload { return &NullableCreateIntakePayload{value: val, isSet: true} } func (v NullableCreateIntakePayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableCreateIntakePayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }