306 lines
9.9 KiB
Go
306 lines
9.9 KiB
Go
/*
|
|
PostgreSQL Flex API
|
|
|
|
This is the documentation for the STACKIT Postgres Flex service
|
|
|
|
API version: 3alpha1
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package postgresflexalpha
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the CreateUserResponse type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &CreateUserResponse{}
|
|
|
|
/*
|
|
types and functions for connectionString
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CreateUserResponseGetConnectionStringAttributeType = *string
|
|
|
|
func getCreateUserResponseGetConnectionStringAttributeTypeOk(arg CreateUserResponseGetConnectionStringAttributeType) (ret CreateUserResponseGetConnectionStringRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateUserResponseGetConnectionStringAttributeType(arg *CreateUserResponseGetConnectionStringAttributeType, val CreateUserResponseGetConnectionStringRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CreateUserResponseGetConnectionStringArgType = string
|
|
type CreateUserResponseGetConnectionStringRetType = string
|
|
|
|
/*
|
|
types and functions for id
|
|
*/
|
|
|
|
// isLong
|
|
type CreateUserResponseGetIdAttributeType = *int64
|
|
type CreateUserResponseGetIdArgType = int64
|
|
type CreateUserResponseGetIdRetType = int64
|
|
|
|
func getCreateUserResponseGetIdAttributeTypeOk(arg CreateUserResponseGetIdAttributeType) (ret CreateUserResponseGetIdRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateUserResponseGetIdAttributeType(arg *CreateUserResponseGetIdAttributeType, val CreateUserResponseGetIdRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for name
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CreateUserResponseGetNameAttributeType = *string
|
|
|
|
func getCreateUserResponseGetNameAttributeTypeOk(arg CreateUserResponseGetNameAttributeType) (ret CreateUserResponseGetNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateUserResponseGetNameAttributeType(arg *CreateUserResponseGetNameAttributeType, val CreateUserResponseGetNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CreateUserResponseGetNameArgType = string
|
|
type CreateUserResponseGetNameRetType = string
|
|
|
|
/*
|
|
types and functions for password
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CreateUserResponseGetPasswordAttributeType = *string
|
|
|
|
func getCreateUserResponseGetPasswordAttributeTypeOk(arg CreateUserResponseGetPasswordAttributeType) (ret CreateUserResponseGetPasswordRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateUserResponseGetPasswordAttributeType(arg *CreateUserResponseGetPasswordAttributeType, val CreateUserResponseGetPasswordRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CreateUserResponseGetPasswordArgType = string
|
|
type CreateUserResponseGetPasswordRetType = string
|
|
|
|
/*
|
|
types and functions for status
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CreateUserResponseGetStatusAttributeType = *string
|
|
|
|
func getCreateUserResponseGetStatusAttributeTypeOk(arg CreateUserResponseGetStatusAttributeType) (ret CreateUserResponseGetStatusRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateUserResponseGetStatusAttributeType(arg *CreateUserResponseGetStatusAttributeType, val CreateUserResponseGetStatusRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CreateUserResponseGetStatusArgType = string
|
|
type CreateUserResponseGetStatusRetType = string
|
|
|
|
// CreateUserResponse struct for CreateUserResponse
|
|
type CreateUserResponse struct {
|
|
// The connection string for the user to the instance.
|
|
// REQUIRED
|
|
ConnectionString CreateUserResponseGetConnectionStringAttributeType `json:"connectionString" required:"true"`
|
|
// The ID of the user.
|
|
// REQUIRED
|
|
Id CreateUserResponseGetIdAttributeType `json:"id" required:"true"`
|
|
// The name of the user.
|
|
// REQUIRED
|
|
Name CreateUserResponseGetNameAttributeType `json:"name" required:"true"`
|
|
// The password for the user.
|
|
// REQUIRED
|
|
Password CreateUserResponseGetPasswordAttributeType `json:"password" required:"true"`
|
|
// The current status of the user.
|
|
// REQUIRED
|
|
Status CreateUserResponseGetStatusAttributeType `json:"status" required:"true"`
|
|
}
|
|
|
|
type _CreateUserResponse CreateUserResponse
|
|
|
|
// NewCreateUserResponse instantiates a new CreateUserResponse 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 NewCreateUserResponse(connectionString CreateUserResponseGetConnectionStringArgType, id CreateUserResponseGetIdArgType, name CreateUserResponseGetNameArgType, password CreateUserResponseGetPasswordArgType, status CreateUserResponseGetStatusArgType) *CreateUserResponse {
|
|
this := CreateUserResponse{}
|
|
setCreateUserResponseGetConnectionStringAttributeType(&this.ConnectionString, connectionString)
|
|
setCreateUserResponseGetIdAttributeType(&this.Id, id)
|
|
setCreateUserResponseGetNameAttributeType(&this.Name, name)
|
|
setCreateUserResponseGetPasswordAttributeType(&this.Password, password)
|
|
setCreateUserResponseGetStatusAttributeType(&this.Status, status)
|
|
return &this
|
|
}
|
|
|
|
// NewCreateUserResponseWithDefaults instantiates a new CreateUserResponse 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 NewCreateUserResponseWithDefaults() *CreateUserResponse {
|
|
this := CreateUserResponse{}
|
|
return &this
|
|
}
|
|
|
|
// GetConnectionString returns the ConnectionString field value
|
|
func (o *CreateUserResponse) GetConnectionString() (ret CreateUserResponseGetConnectionStringRetType) {
|
|
ret, _ = o.GetConnectionStringOk()
|
|
return ret
|
|
}
|
|
|
|
// GetConnectionStringOk returns a tuple with the ConnectionString field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CreateUserResponse) GetConnectionStringOk() (ret CreateUserResponseGetConnectionStringRetType, ok bool) {
|
|
return getCreateUserResponseGetConnectionStringAttributeTypeOk(o.ConnectionString)
|
|
}
|
|
|
|
// SetConnectionString sets field value
|
|
func (o *CreateUserResponse) SetConnectionString(v CreateUserResponseGetConnectionStringRetType) {
|
|
setCreateUserResponseGetConnectionStringAttributeType(&o.ConnectionString, v)
|
|
}
|
|
|
|
// GetId returns the Id field value
|
|
func (o *CreateUserResponse) GetId() (ret CreateUserResponseGetIdRetType) {
|
|
ret, _ = o.GetIdOk()
|
|
return ret
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CreateUserResponse) GetIdOk() (ret CreateUserResponseGetIdRetType, ok bool) {
|
|
return getCreateUserResponseGetIdAttributeTypeOk(o.Id)
|
|
}
|
|
|
|
// SetId sets field value
|
|
func (o *CreateUserResponse) SetId(v CreateUserResponseGetIdRetType) {
|
|
setCreateUserResponseGetIdAttributeType(&o.Id, v)
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *CreateUserResponse) GetName() (ret CreateUserResponseGetNameRetType) {
|
|
ret, _ = o.GetNameOk()
|
|
return ret
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CreateUserResponse) GetNameOk() (ret CreateUserResponseGetNameRetType, ok bool) {
|
|
return getCreateUserResponseGetNameAttributeTypeOk(o.Name)
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *CreateUserResponse) SetName(v CreateUserResponseGetNameRetType) {
|
|
setCreateUserResponseGetNameAttributeType(&o.Name, v)
|
|
}
|
|
|
|
// GetPassword returns the Password field value
|
|
func (o *CreateUserResponse) GetPassword() (ret CreateUserResponseGetPasswordRetType) {
|
|
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 *CreateUserResponse) GetPasswordOk() (ret CreateUserResponseGetPasswordRetType, ok bool) {
|
|
return getCreateUserResponseGetPasswordAttributeTypeOk(o.Password)
|
|
}
|
|
|
|
// SetPassword sets field value
|
|
func (o *CreateUserResponse) SetPassword(v CreateUserResponseGetPasswordRetType) {
|
|
setCreateUserResponseGetPasswordAttributeType(&o.Password, v)
|
|
}
|
|
|
|
// GetStatus returns the Status field value
|
|
func (o *CreateUserResponse) GetStatus() (ret CreateUserResponseGetStatusRetType) {
|
|
ret, _ = o.GetStatusOk()
|
|
return ret
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CreateUserResponse) GetStatusOk() (ret CreateUserResponseGetStatusRetType, ok bool) {
|
|
return getCreateUserResponseGetStatusAttributeTypeOk(o.Status)
|
|
}
|
|
|
|
// SetStatus sets field value
|
|
func (o *CreateUserResponse) SetStatus(v CreateUserResponseGetStatusRetType) {
|
|
setCreateUserResponseGetStatusAttributeType(&o.Status, v)
|
|
}
|
|
|
|
func (o CreateUserResponse) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getCreateUserResponseGetConnectionStringAttributeTypeOk(o.ConnectionString); ok {
|
|
toSerialize["ConnectionString"] = val
|
|
}
|
|
if val, ok := getCreateUserResponseGetIdAttributeTypeOk(o.Id); ok {
|
|
toSerialize["Id"] = val
|
|
}
|
|
if val, ok := getCreateUserResponseGetNameAttributeTypeOk(o.Name); ok {
|
|
toSerialize["Name"] = val
|
|
}
|
|
if val, ok := getCreateUserResponseGetPasswordAttributeTypeOk(o.Password); ok {
|
|
toSerialize["Password"] = val
|
|
}
|
|
if val, ok := getCreateUserResponseGetStatusAttributeTypeOk(o.Status); ok {
|
|
toSerialize["Status"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableCreateUserResponse struct {
|
|
value *CreateUserResponse
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableCreateUserResponse) Get() *CreateUserResponse {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableCreateUserResponse) Set(val *CreateUserResponse) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableCreateUserResponse) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableCreateUserResponse) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableCreateUserResponse(val *CreateUserResponse) *NullableCreateUserResponse {
|
|
return &NullableCreateUserResponse{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableCreateUserResponse) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableCreateUserResponse) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|