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

319 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 CreateIntakeUserPayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateIntakeUserPayload{}
/*
types and functions for description
*/
// isNotNullableString
type CreateIntakeUserPayloadGetDescriptionAttributeType = *string
func getCreateIntakeUserPayloadGetDescriptionAttributeTypeOk(arg CreateIntakeUserPayloadGetDescriptionAttributeType) (ret CreateIntakeUserPayloadGetDescriptionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateIntakeUserPayloadGetDescriptionAttributeType(arg *CreateIntakeUserPayloadGetDescriptionAttributeType, val CreateIntakeUserPayloadGetDescriptionRetType) {
*arg = &val
}
type CreateIntakeUserPayloadGetDescriptionArgType = string
type CreateIntakeUserPayloadGetDescriptionRetType = string
/*
types and functions for displayName
*/
// isNotNullableString
type CreateIntakeUserPayloadGetDisplayNameAttributeType = *string
func getCreateIntakeUserPayloadGetDisplayNameAttributeTypeOk(arg CreateIntakeUserPayloadGetDisplayNameAttributeType) (ret CreateIntakeUserPayloadGetDisplayNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateIntakeUserPayloadGetDisplayNameAttributeType(arg *CreateIntakeUserPayloadGetDisplayNameAttributeType, val CreateIntakeUserPayloadGetDisplayNameRetType) {
*arg = &val
}
type CreateIntakeUserPayloadGetDisplayNameArgType = string
type CreateIntakeUserPayloadGetDisplayNameRetType = string
/*
types and functions for labels
*/
// isContainer
type CreateIntakeUserPayloadGetLabelsAttributeType = *map[string]string
type CreateIntakeUserPayloadGetLabelsArgType = *map[string]string
type CreateIntakeUserPayloadGetLabelsRetType = *map[string]string
func getCreateIntakeUserPayloadGetLabelsAttributeTypeOk(arg CreateIntakeUserPayloadGetLabelsAttributeType) (ret CreateIntakeUserPayloadGetLabelsRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg, true
}
func setCreateIntakeUserPayloadGetLabelsAttributeType(arg *CreateIntakeUserPayloadGetLabelsAttributeType, val CreateIntakeUserPayloadGetLabelsRetType) {
*arg = val
}
/*
types and functions for password
*/
// isNotNullableString
type CreateIntakeUserPayloadGetPasswordAttributeType = *string
func getCreateIntakeUserPayloadGetPasswordAttributeTypeOk(arg CreateIntakeUserPayloadGetPasswordAttributeType) (ret CreateIntakeUserPayloadGetPasswordRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateIntakeUserPayloadGetPasswordAttributeType(arg *CreateIntakeUserPayloadGetPasswordAttributeType, val CreateIntakeUserPayloadGetPasswordRetType) {
*arg = &val
}
type CreateIntakeUserPayloadGetPasswordArgType = string
type CreateIntakeUserPayloadGetPasswordRetType = string
/*
types and functions for type
*/
// isEnumRef
type CreateIntakeUserPayloadGetTypeAttributeType = *UserType
type CreateIntakeUserPayloadGetTypeArgType = UserType
type CreateIntakeUserPayloadGetTypeRetType = UserType
func getCreateIntakeUserPayloadGetTypeAttributeTypeOk(arg CreateIntakeUserPayloadGetTypeAttributeType) (ret CreateIntakeUserPayloadGetTypeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateIntakeUserPayloadGetTypeAttributeType(arg *CreateIntakeUserPayloadGetTypeAttributeType, val CreateIntakeUserPayloadGetTypeRetType) {
*arg = &val
}
// CreateIntakeUserPayload struct for CreateIntakeUserPayload
type CreateIntakeUserPayload struct {
// The description is a longer text chosen by the user to provide more context for the resource.
Description CreateIntakeUserPayloadGetDescriptionAttributeType `json:"description,omitempty"`
// The display name is a short name chosen by the user to identify the resource.
// REQUIRED
DisplayName CreateIntakeUserPayloadGetDisplayNameAttributeType `json:"displayName" required:"true"`
// Labels are key-value pairs associated with the resource.
Labels CreateIntakeUserPayloadGetLabelsAttributeType `json:"labels,omitempty"`
// A password chosen by the user. The password must consist of at least of each of these categories: * lower case letter * upper case letter * number * other character
// REQUIRED
Password CreateIntakeUserPayloadGetPasswordAttributeType `json:"password" required:"true"`
Type CreateIntakeUserPayloadGetTypeAttributeType `json:"type,omitempty"`
}
type _CreateIntakeUserPayload CreateIntakeUserPayload
// NewCreateIntakeUserPayload instantiates a new CreateIntakeUserPayload 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 NewCreateIntakeUserPayload(displayName CreateIntakeUserPayloadGetDisplayNameArgType, password CreateIntakeUserPayloadGetPasswordArgType) *CreateIntakeUserPayload {
this := CreateIntakeUserPayload{}
setCreateIntakeUserPayloadGetDisplayNameAttributeType(&this.DisplayName, displayName)
setCreateIntakeUserPayloadGetPasswordAttributeType(&this.Password, password)
return &this
}
// NewCreateIntakeUserPayloadWithDefaults instantiates a new CreateIntakeUserPayload 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 NewCreateIntakeUserPayloadWithDefaults() *CreateIntakeUserPayload {
this := CreateIntakeUserPayload{}
var types UserType = USERTYPE_INTAKE
this.Type = &types
return &this
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *CreateIntakeUserPayload) GetDescription() (res CreateIntakeUserPayloadGetDescriptionRetType) {
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 *CreateIntakeUserPayload) GetDescriptionOk() (ret CreateIntakeUserPayloadGetDescriptionRetType, ok bool) {
return getCreateIntakeUserPayloadGetDescriptionAttributeTypeOk(o.Description)
}
// HasDescription returns a boolean if a field has been set.
func (o *CreateIntakeUserPayload) HasDescription() bool {
_, ok := o.GetDescriptionOk()
return ok
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *CreateIntakeUserPayload) SetDescription(v CreateIntakeUserPayloadGetDescriptionRetType) {
setCreateIntakeUserPayloadGetDescriptionAttributeType(&o.Description, v)
}
// GetDisplayName returns the DisplayName field value
func (o *CreateIntakeUserPayload) GetDisplayName() (ret CreateIntakeUserPayloadGetDisplayNameRetType) {
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 *CreateIntakeUserPayload) GetDisplayNameOk() (ret CreateIntakeUserPayloadGetDisplayNameRetType, ok bool) {
return getCreateIntakeUserPayloadGetDisplayNameAttributeTypeOk(o.DisplayName)
}
// SetDisplayName sets field value
func (o *CreateIntakeUserPayload) SetDisplayName(v CreateIntakeUserPayloadGetDisplayNameRetType) {
setCreateIntakeUserPayloadGetDisplayNameAttributeType(&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 *CreateIntakeUserPayload) GetLabels() (res CreateIntakeUserPayloadGetLabelsRetType) {
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 *CreateIntakeUserPayload) GetLabelsOk() (ret CreateIntakeUserPayloadGetLabelsRetType, ok bool) {
return getCreateIntakeUserPayloadGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *CreateIntakeUserPayload) 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 *CreateIntakeUserPayload) SetLabels(v CreateIntakeUserPayloadGetLabelsRetType) {
setCreateIntakeUserPayloadGetLabelsAttributeType(&o.Labels, v)
}
// GetPassword returns the Password field value
func (o *CreateIntakeUserPayload) GetPassword() (ret CreateIntakeUserPayloadGetPasswordRetType) {
ret, _ = o.GetPasswordOk()
return ret
}
// GetPasswordOk returns a tuple with the Password field value
// and a boolean to check if the value has been set.
func (o *CreateIntakeUserPayload) GetPasswordOk() (ret CreateIntakeUserPayloadGetPasswordRetType, ok bool) {
return getCreateIntakeUserPayloadGetPasswordAttributeTypeOk(o.Password)
}
// SetPassword sets field value
func (o *CreateIntakeUserPayload) SetPassword(v CreateIntakeUserPayloadGetPasswordRetType) {
setCreateIntakeUserPayloadGetPasswordAttributeType(&o.Password, v)
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *CreateIntakeUserPayload) GetType() (res CreateIntakeUserPayloadGetTypeRetType) {
res, _ = o.GetTypeOk()
return
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateIntakeUserPayload) GetTypeOk() (ret CreateIntakeUserPayloadGetTypeRetType, ok bool) {
return getCreateIntakeUserPayloadGetTypeAttributeTypeOk(o.Type)
}
// HasType returns a boolean if a field has been set.
func (o *CreateIntakeUserPayload) HasType() bool {
_, ok := o.GetTypeOk()
return ok
}
// SetType gets a reference to the given UserType and assigns it to the Type field.
func (o *CreateIntakeUserPayload) SetType(v CreateIntakeUserPayloadGetTypeRetType) {
setCreateIntakeUserPayloadGetTypeAttributeType(&o.Type, v)
}
func (o CreateIntakeUserPayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getCreateIntakeUserPayloadGetDescriptionAttributeTypeOk(o.Description); ok {
toSerialize["Description"] = val
}
if val, ok := getCreateIntakeUserPayloadGetDisplayNameAttributeTypeOk(o.DisplayName); ok {
toSerialize["DisplayName"] = val
}
if val, ok := getCreateIntakeUserPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getCreateIntakeUserPayloadGetPasswordAttributeTypeOk(o.Password); ok {
toSerialize["Password"] = val
}
if val, ok := getCreateIntakeUserPayloadGetTypeAttributeTypeOk(o.Type); ok {
toSerialize["Type"] = val
}
return toSerialize, nil
}
type NullableCreateIntakeUserPayload struct {
value *CreateIntakeUserPayload
isSet bool
}
func (v NullableCreateIntakeUserPayload) Get() *CreateIntakeUserPayload {
return v.value
}
func (v *NullableCreateIntakeUserPayload) Set(val *CreateIntakeUserPayload) {
v.value = val
v.isSet = true
}
func (v NullableCreateIntakeUserPayload) IsSet() bool {
return v.isSet
}
func (v *NullableCreateIntakeUserPayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateIntakeUserPayload(val *CreateIntakeUserPayload) *NullableCreateIntakeUserPayload {
return &NullableCreateIntakeUserPayload{value: val, isSet: true}
}
func (v NullableCreateIntakeUserPayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateIntakeUserPayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}