/* 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 GetUserResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &GetUserResponse{} /* types and functions for connectionString */ // isNotNullableString type GetUserResponseGetConnectionStringAttributeType = *string func getGetUserResponseGetConnectionStringAttributeTypeOk(arg GetUserResponseGetConnectionStringAttributeType) (ret GetUserResponseGetConnectionStringRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setGetUserResponseGetConnectionStringAttributeType(arg *GetUserResponseGetConnectionStringAttributeType, val GetUserResponseGetConnectionStringRetType) { *arg = &val } type GetUserResponseGetConnectionStringArgType = string type GetUserResponseGetConnectionStringRetType = string /* types and functions for host */ // isNotNullableString type GetUserResponseGetHostAttributeType = *string func getGetUserResponseGetHostAttributeTypeOk(arg GetUserResponseGetHostAttributeType) (ret GetUserResponseGetHostRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setGetUserResponseGetHostAttributeType(arg *GetUserResponseGetHostAttributeType, val GetUserResponseGetHostRetType) { *arg = &val } type GetUserResponseGetHostArgType = string type GetUserResponseGetHostRetType = string /* types and functions for id */ // isLong type GetUserResponseGetIdAttributeType = *int64 type GetUserResponseGetIdArgType = int64 type GetUserResponseGetIdRetType = int64 func getGetUserResponseGetIdAttributeTypeOk(arg GetUserResponseGetIdAttributeType) (ret GetUserResponseGetIdRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setGetUserResponseGetIdAttributeType(arg *GetUserResponseGetIdAttributeType, val GetUserResponseGetIdRetType) { *arg = &val } /* types and functions for name */ // isNotNullableString type GetUserResponseGetNameAttributeType = *string func getGetUserResponseGetNameAttributeTypeOk(arg GetUserResponseGetNameAttributeType) (ret GetUserResponseGetNameRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setGetUserResponseGetNameAttributeType(arg *GetUserResponseGetNameAttributeType, val GetUserResponseGetNameRetType) { *arg = &val } type GetUserResponseGetNameArgType = string type GetUserResponseGetNameRetType = string /* types and functions for port */ // isInteger type GetUserResponseGetPortAttributeType = *int64 type GetUserResponseGetPortArgType = int64 type GetUserResponseGetPortRetType = int64 func getGetUserResponseGetPortAttributeTypeOk(arg GetUserResponseGetPortAttributeType) (ret GetUserResponseGetPortRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setGetUserResponseGetPortAttributeType(arg *GetUserResponseGetPortAttributeType, val GetUserResponseGetPortRetType) { *arg = &val } /* types and functions for roles */ // isArray type GetUserResponseGetRolesAttributeType = *[]UserRole type GetUserResponseGetRolesArgType = []UserRole type GetUserResponseGetRolesRetType = []UserRole func getGetUserResponseGetRolesAttributeTypeOk(arg GetUserResponseGetRolesAttributeType) (ret GetUserResponseGetRolesRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setGetUserResponseGetRolesAttributeType(arg *GetUserResponseGetRolesAttributeType, val GetUserResponseGetRolesRetType) { *arg = &val } /* types and functions for status */ // isNotNullableString type GetUserResponseGetStatusAttributeType = *string func getGetUserResponseGetStatusAttributeTypeOk(arg GetUserResponseGetStatusAttributeType) (ret GetUserResponseGetStatusRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setGetUserResponseGetStatusAttributeType(arg *GetUserResponseGetStatusAttributeType, val GetUserResponseGetStatusRetType) { *arg = &val } type GetUserResponseGetStatusArgType = string type GetUserResponseGetStatusRetType = string // GetUserResponse struct for GetUserResponse type GetUserResponse struct { // The connection string for the user to the instance. // REQUIRED ConnectionString GetUserResponseGetConnectionStringAttributeType `json:"connectionString" required:"true"` // The host of the instance in which the user belongs to. // REQUIRED Host GetUserResponseGetHostAttributeType `json:"host" required:"true"` // The ID of the user. // REQUIRED Id GetUserResponseGetIdAttributeType `json:"id" required:"true"` // The name of the user. // REQUIRED Name GetUserResponseGetNameAttributeType `json:"name" required:"true"` // The port of the instance in which the user belongs to. // Can be cast to int32 without loss of precision. // REQUIRED Port GetUserResponseGetPortAttributeType `json:"port" required:"true"` // A list of user roles. // REQUIRED Roles GetUserResponseGetRolesAttributeType `json:"roles" required:"true"` // The current status of the user. // REQUIRED Status GetUserResponseGetStatusAttributeType `json:"status" required:"true"` } type _GetUserResponse GetUserResponse // NewGetUserResponse instantiates a new GetUserResponse 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 NewGetUserResponse(connectionString GetUserResponseGetConnectionStringArgType, host GetUserResponseGetHostArgType, id GetUserResponseGetIdArgType, name GetUserResponseGetNameArgType, port GetUserResponseGetPortArgType, roles GetUserResponseGetRolesArgType, status GetUserResponseGetStatusArgType) *GetUserResponse { this := GetUserResponse{} setGetUserResponseGetConnectionStringAttributeType(&this.ConnectionString, connectionString) setGetUserResponseGetHostAttributeType(&this.Host, host) setGetUserResponseGetIdAttributeType(&this.Id, id) setGetUserResponseGetNameAttributeType(&this.Name, name) setGetUserResponseGetPortAttributeType(&this.Port, port) setGetUserResponseGetRolesAttributeType(&this.Roles, roles) setGetUserResponseGetStatusAttributeType(&this.Status, status) return &this } // NewGetUserResponseWithDefaults instantiates a new GetUserResponse 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 NewGetUserResponseWithDefaults() *GetUserResponse { this := GetUserResponse{} return &this } // GetConnectionString returns the ConnectionString field value func (o *GetUserResponse) GetConnectionString() (ret GetUserResponseGetConnectionStringRetType) { 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 *GetUserResponse) GetConnectionStringOk() (ret GetUserResponseGetConnectionStringRetType, ok bool) { return getGetUserResponseGetConnectionStringAttributeTypeOk(o.ConnectionString) } // SetConnectionString sets field value func (o *GetUserResponse) SetConnectionString(v GetUserResponseGetConnectionStringRetType) { setGetUserResponseGetConnectionStringAttributeType(&o.ConnectionString, v) } // GetHost returns the Host field value func (o *GetUserResponse) GetHost() (ret GetUserResponseGetHostRetType) { ret, _ = o.GetHostOk() return ret } // GetHostOk returns a tuple with the Host field value // and a boolean to check if the value has been set. func (o *GetUserResponse) GetHostOk() (ret GetUserResponseGetHostRetType, ok bool) { return getGetUserResponseGetHostAttributeTypeOk(o.Host) } // SetHost sets field value func (o *GetUserResponse) SetHost(v GetUserResponseGetHostRetType) { setGetUserResponseGetHostAttributeType(&o.Host, v) } // GetId returns the Id field value func (o *GetUserResponse) GetId() (ret GetUserResponseGetIdRetType) { 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 *GetUserResponse) GetIdOk() (ret GetUserResponseGetIdRetType, ok bool) { return getGetUserResponseGetIdAttributeTypeOk(o.Id) } // SetId sets field value func (o *GetUserResponse) SetId(v GetUserResponseGetIdRetType) { setGetUserResponseGetIdAttributeType(&o.Id, v) } // GetName returns the Name field value func (o *GetUserResponse) GetName() (ret GetUserResponseGetNameRetType) { 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 *GetUserResponse) GetNameOk() (ret GetUserResponseGetNameRetType, ok bool) { return getGetUserResponseGetNameAttributeTypeOk(o.Name) } // SetName sets field value func (o *GetUserResponse) SetName(v GetUserResponseGetNameRetType) { setGetUserResponseGetNameAttributeType(&o.Name, v) } // GetPort returns the Port field value func (o *GetUserResponse) GetPort() (ret GetUserResponseGetPortRetType) { ret, _ = o.GetPortOk() return ret } // GetPortOk returns a tuple with the Port field value // and a boolean to check if the value has been set. func (o *GetUserResponse) GetPortOk() (ret GetUserResponseGetPortRetType, ok bool) { return getGetUserResponseGetPortAttributeTypeOk(o.Port) } // SetPort sets field value func (o *GetUserResponse) SetPort(v GetUserResponseGetPortRetType) { setGetUserResponseGetPortAttributeType(&o.Port, v) } // GetRoles returns the Roles field value func (o *GetUserResponse) GetRoles() (ret GetUserResponseGetRolesRetType) { ret, _ = o.GetRolesOk() return ret } // GetRolesOk returns a tuple with the Roles field value // and a boolean to check if the value has been set. func (o *GetUserResponse) GetRolesOk() (ret GetUserResponseGetRolesRetType, ok bool) { return getGetUserResponseGetRolesAttributeTypeOk(o.Roles) } // SetRoles sets field value func (o *GetUserResponse) SetRoles(v GetUserResponseGetRolesRetType) { setGetUserResponseGetRolesAttributeType(&o.Roles, v) } // GetStatus returns the Status field value func (o *GetUserResponse) GetStatus() (ret GetUserResponseGetStatusRetType) { 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 *GetUserResponse) GetStatusOk() (ret GetUserResponseGetStatusRetType, ok bool) { return getGetUserResponseGetStatusAttributeTypeOk(o.Status) } // SetStatus sets field value func (o *GetUserResponse) SetStatus(v GetUserResponseGetStatusRetType) { setGetUserResponseGetStatusAttributeType(&o.Status, v) } func (o GetUserResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getGetUserResponseGetConnectionStringAttributeTypeOk(o.ConnectionString); ok { toSerialize["ConnectionString"] = val } if val, ok := getGetUserResponseGetHostAttributeTypeOk(o.Host); ok { toSerialize["Host"] = val } if val, ok := getGetUserResponseGetIdAttributeTypeOk(o.Id); ok { toSerialize["Id"] = val } if val, ok := getGetUserResponseGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } if val, ok := getGetUserResponseGetPortAttributeTypeOk(o.Port); ok { toSerialize["Port"] = val } if val, ok := getGetUserResponseGetRolesAttributeTypeOk(o.Roles); ok { toSerialize["Roles"] = val } if val, ok := getGetUserResponseGetStatusAttributeTypeOk(o.Status); ok { toSerialize["Status"] = val } return toSerialize, nil } type NullableGetUserResponse struct { value *GetUserResponse isSet bool } func (v NullableGetUserResponse) Get() *GetUserResponse { return v.value } func (v *NullableGetUserResponse) Set(val *GetUserResponse) { v.value = val v.isSet = true } func (v NullableGetUserResponse) IsSet() bool { return v.isSet } func (v *NullableGetUserResponse) Unset() { v.value = nil v.isSet = false } func NewNullableGetUserResponse(val *GetUserResponse) *NullableGetUserResponse { return &NullableGetUserResponse{value: val, isSet: true} } func (v NullableGetUserResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableGetUserResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }