terraform-provider-stackitp.../pkg/edgebeta/model_user.go

172 lines
4.3 KiB
Go

/*
STACKIT Edge Cloud API
This API provides endpoints for managing STACKIT Edge Cloud instances.
API version: 1beta1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package edgebeta
import (
"encoding/json"
)
// checks if the User type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &User{}
/*
types and functions for email
*/
// isNotNullableString
type UserGetEmailAttributeType = *string
func getUserGetEmailAttributeTypeOk(arg UserGetEmailAttributeType) (ret UserGetEmailRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUserGetEmailAttributeType(arg *UserGetEmailAttributeType, val UserGetEmailRetType) {
*arg = &val
}
type UserGetEmailArgType = string
type UserGetEmailRetType = string
/*
types and functions for internalId
*/
// isNotNullableString
type UserGetInternalIdAttributeType = *string
func getUserGetInternalIdAttributeTypeOk(arg UserGetInternalIdAttributeType) (ret UserGetInternalIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUserGetInternalIdAttributeType(arg *UserGetInternalIdAttributeType, val UserGetInternalIdRetType) {
*arg = &val
}
type UserGetInternalIdArgType = string
type UserGetInternalIdRetType = string
// User struct for User
type User struct {
// The email of the user.
// REQUIRED
Email UserGetEmailAttributeType `json:"email" required:"true"`
// The UUID of the user.
// REQUIRED
InternalId UserGetInternalIdAttributeType `json:"internalId" required:"true"`
}
type _User User
// NewUser instantiates a new User 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 NewUser(email UserGetEmailArgType, internalId UserGetInternalIdArgType) *User {
this := User{}
setUserGetEmailAttributeType(&this.Email, email)
setUserGetInternalIdAttributeType(&this.InternalId, internalId)
return &this
}
// NewUserWithDefaults instantiates a new User 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 NewUserWithDefaults() *User {
this := User{}
return &this
}
// GetEmail returns the Email field value
func (o *User) GetEmail() (ret UserGetEmailRetType) {
ret, _ = o.GetEmailOk()
return ret
}
// GetEmailOk returns a tuple with the Email field value
// and a boolean to check if the value has been set.
func (o *User) GetEmailOk() (ret UserGetEmailRetType, ok bool) {
return getUserGetEmailAttributeTypeOk(o.Email)
}
// SetEmail sets field value
func (o *User) SetEmail(v UserGetEmailRetType) {
setUserGetEmailAttributeType(&o.Email, v)
}
// GetInternalId returns the InternalId field value
func (o *User) GetInternalId() (ret UserGetInternalIdRetType) {
ret, _ = o.GetInternalIdOk()
return ret
}
// GetInternalIdOk returns a tuple with the InternalId field value
// and a boolean to check if the value has been set.
func (o *User) GetInternalIdOk() (ret UserGetInternalIdRetType, ok bool) {
return getUserGetInternalIdAttributeTypeOk(o.InternalId)
}
// SetInternalId sets field value
func (o *User) SetInternalId(v UserGetInternalIdRetType) {
setUserGetInternalIdAttributeType(&o.InternalId, v)
}
func (o User) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getUserGetEmailAttributeTypeOk(o.Email); ok {
toSerialize["Email"] = val
}
if val, ok := getUserGetInternalIdAttributeTypeOk(o.InternalId); ok {
toSerialize["InternalId"] = val
}
return toSerialize, nil
}
type NullableUser struct {
value *User
isSet bool
}
func (v NullableUser) Get() *User {
return v.value
}
func (v *NullableUser) Set(val *User) {
v.value = val
v.isSet = true
}
func (v NullableUser) IsSet() bool {
return v.isSet
}
func (v *NullableUser) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUser(val *User) *NullableUser {
return &NullableUser{value: val, isSet: true}
}
func (v NullableUser) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUser) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}