484 lines
16 KiB
Go
484 lines
16 KiB
Go
/*
|
|
STACKIT MSSQL Service API
|
|
|
|
This is the documentation for the STACKIT MSSQL service
|
|
|
|
API version: 3alpha1
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package sqlserverflexalpha
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the CreateUserResponse type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &CreateUserResponse{}
|
|
|
|
/*
|
|
types and functions for default_database
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CreateUserResponseGetDefaultDatabaseAttributeType = *string
|
|
|
|
func getCreateUserResponseGetDefaultDatabaseAttributeTypeOk(arg CreateUserResponseGetDefaultDatabaseAttributeType) (ret CreateUserResponseGetDefaultDatabaseRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateUserResponseGetDefaultDatabaseAttributeType(arg *CreateUserResponseGetDefaultDatabaseAttributeType, val CreateUserResponseGetDefaultDatabaseRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CreateUserResponseGetDefaultDatabaseArgType = string
|
|
type CreateUserResponseGetDefaultDatabaseRetType = string
|
|
|
|
/*
|
|
types and functions for host
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CreateUserResponseGetHostAttributeType = *string
|
|
|
|
func getCreateUserResponseGetHostAttributeTypeOk(arg CreateUserResponseGetHostAttributeType) (ret CreateUserResponseGetHostRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateUserResponseGetHostAttributeType(arg *CreateUserResponseGetHostAttributeType, val CreateUserResponseGetHostRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CreateUserResponseGetHostArgType = string
|
|
type CreateUserResponseGetHostRetType = 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 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 port
|
|
*/
|
|
|
|
// isInteger
|
|
type CreateUserResponseGetPortAttributeType = *int64
|
|
type CreateUserResponseGetPortArgType = int64
|
|
type CreateUserResponseGetPortRetType = int64
|
|
|
|
func getCreateUserResponseGetPortAttributeTypeOk(arg CreateUserResponseGetPortAttributeType) (ret CreateUserResponseGetPortRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateUserResponseGetPortAttributeType(arg *CreateUserResponseGetPortAttributeType, val CreateUserResponseGetPortRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for roles
|
|
*/
|
|
|
|
// isArray
|
|
type CreateUserResponseGetRolesAttributeType = *[]UserRole
|
|
type CreateUserResponseGetRolesArgType = []UserRole
|
|
type CreateUserResponseGetRolesRetType = []UserRole
|
|
|
|
func getCreateUserResponseGetRolesAttributeTypeOk(arg CreateUserResponseGetRolesAttributeType) (ret CreateUserResponseGetRolesRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateUserResponseGetRolesAttributeType(arg *CreateUserResponseGetRolesAttributeType, val CreateUserResponseGetRolesRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
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
|
|
|
|
/*
|
|
types and functions for uri
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CreateUserResponseGetUriAttributeType = *string
|
|
|
|
func getCreateUserResponseGetUriAttributeTypeOk(arg CreateUserResponseGetUriAttributeType) (ret CreateUserResponseGetUriRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateUserResponseGetUriAttributeType(arg *CreateUserResponseGetUriAttributeType, val CreateUserResponseGetUriRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CreateUserResponseGetUriArgType = string
|
|
type CreateUserResponseGetUriRetType = string
|
|
|
|
/*
|
|
types and functions for username
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CreateUserResponseGetUsernameAttributeType = *string
|
|
|
|
func getCreateUserResponseGetUsernameAttributeTypeOk(arg CreateUserResponseGetUsernameAttributeType) (ret CreateUserResponseGetUsernameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateUserResponseGetUsernameAttributeType(arg *CreateUserResponseGetUsernameAttributeType, val CreateUserResponseGetUsernameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CreateUserResponseGetUsernameArgType = string
|
|
type CreateUserResponseGetUsernameRetType = string
|
|
|
|
// CreateUserResponse struct for CreateUserResponse
|
|
type CreateUserResponse struct {
|
|
// The default database for a user of the instance.
|
|
// REQUIRED
|
|
DefaultDatabase CreateUserResponseGetDefaultDatabaseAttributeType `json:"default_database" required:"true"`
|
|
// The host of the instance in which the user belongs to.
|
|
// REQUIRED
|
|
Host CreateUserResponseGetHostAttributeType `json:"host" required:"true"`
|
|
// The ID of the user.
|
|
// REQUIRED
|
|
Id CreateUserResponseGetIdAttributeType `json:"id" required:"true"`
|
|
// The password for the user.
|
|
// REQUIRED
|
|
Password CreateUserResponseGetPasswordAttributeType `json:"password" required:"true"`
|
|
// The port of the instance in which the user belongs to.
|
|
// Can be cast to int32 without loss of precision.
|
|
// REQUIRED
|
|
Port CreateUserResponseGetPortAttributeType `json:"port" required:"true"`
|
|
// REQUIRED
|
|
Roles CreateUserResponseGetRolesAttributeType `json:"roles" required:"true"`
|
|
// The current status of the user.
|
|
// REQUIRED
|
|
Status CreateUserResponseGetStatusAttributeType `json:"status" required:"true"`
|
|
// The connection string for the user to the instance.
|
|
// REQUIRED
|
|
Uri CreateUserResponseGetUriAttributeType `json:"uri" required:"true"`
|
|
// The name of the user.
|
|
// REQUIRED
|
|
Username CreateUserResponseGetUsernameAttributeType `json:"username" 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(defaultDatabase CreateUserResponseGetDefaultDatabaseArgType, host CreateUserResponseGetHostArgType, id CreateUserResponseGetIdArgType, password CreateUserResponseGetPasswordArgType, port CreateUserResponseGetPortArgType, roles CreateUserResponseGetRolesArgType, status CreateUserResponseGetStatusArgType, uri CreateUserResponseGetUriArgType, username CreateUserResponseGetUsernameArgType) *CreateUserResponse {
|
|
this := CreateUserResponse{}
|
|
setCreateUserResponseGetDefaultDatabaseAttributeType(&this.DefaultDatabase, defaultDatabase)
|
|
setCreateUserResponseGetHostAttributeType(&this.Host, host)
|
|
setCreateUserResponseGetIdAttributeType(&this.Id, id)
|
|
setCreateUserResponseGetPasswordAttributeType(&this.Password, password)
|
|
setCreateUserResponseGetPortAttributeType(&this.Port, port)
|
|
setCreateUserResponseGetRolesAttributeType(&this.Roles, roles)
|
|
setCreateUserResponseGetStatusAttributeType(&this.Status, status)
|
|
setCreateUserResponseGetUriAttributeType(&this.Uri, uri)
|
|
setCreateUserResponseGetUsernameAttributeType(&this.Username, username)
|
|
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
|
|
}
|
|
|
|
// GetDefaultDatabase returns the DefaultDatabase field value
|
|
func (o *CreateUserResponse) GetDefaultDatabase() (ret CreateUserResponseGetDefaultDatabaseRetType) {
|
|
ret, _ = o.GetDefaultDatabaseOk()
|
|
return ret
|
|
}
|
|
|
|
// GetDefaultDatabaseOk returns a tuple with the DefaultDatabase field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CreateUserResponse) GetDefaultDatabaseOk() (ret CreateUserResponseGetDefaultDatabaseRetType, ok bool) {
|
|
return getCreateUserResponseGetDefaultDatabaseAttributeTypeOk(o.DefaultDatabase)
|
|
}
|
|
|
|
// SetDefaultDatabase sets field value
|
|
func (o *CreateUserResponse) SetDefaultDatabase(v CreateUserResponseGetDefaultDatabaseRetType) {
|
|
setCreateUserResponseGetDefaultDatabaseAttributeType(&o.DefaultDatabase, v)
|
|
}
|
|
|
|
// GetHost returns the Host field value
|
|
func (o *CreateUserResponse) GetHost() (ret CreateUserResponseGetHostRetType) {
|
|
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 *CreateUserResponse) GetHostOk() (ret CreateUserResponseGetHostRetType, ok bool) {
|
|
return getCreateUserResponseGetHostAttributeTypeOk(o.Host)
|
|
}
|
|
|
|
// SetHost sets field value
|
|
func (o *CreateUserResponse) SetHost(v CreateUserResponseGetHostRetType) {
|
|
setCreateUserResponseGetHostAttributeType(&o.Host, 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)
|
|
}
|
|
|
|
// 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)
|
|
}
|
|
|
|
// GetPort returns the Port field value
|
|
func (o *CreateUserResponse) GetPort() (ret CreateUserResponseGetPortRetType) {
|
|
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 *CreateUserResponse) GetPortOk() (ret CreateUserResponseGetPortRetType, ok bool) {
|
|
return getCreateUserResponseGetPortAttributeTypeOk(o.Port)
|
|
}
|
|
|
|
// SetPort sets field value
|
|
func (o *CreateUserResponse) SetPort(v CreateUserResponseGetPortRetType) {
|
|
setCreateUserResponseGetPortAttributeType(&o.Port, v)
|
|
}
|
|
|
|
// GetRoles returns the Roles field value
|
|
func (o *CreateUserResponse) GetRoles() (ret CreateUserResponseGetRolesRetType) {
|
|
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 *CreateUserResponse) GetRolesOk() (ret CreateUserResponseGetRolesRetType, ok bool) {
|
|
return getCreateUserResponseGetRolesAttributeTypeOk(o.Roles)
|
|
}
|
|
|
|
// SetRoles sets field value
|
|
func (o *CreateUserResponse) SetRoles(v CreateUserResponseGetRolesRetType) {
|
|
setCreateUserResponseGetRolesAttributeType(&o.Roles, 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)
|
|
}
|
|
|
|
// GetUri returns the Uri field value
|
|
func (o *CreateUserResponse) GetUri() (ret CreateUserResponseGetUriRetType) {
|
|
ret, _ = o.GetUriOk()
|
|
return ret
|
|
}
|
|
|
|
// GetUriOk returns a tuple with the Uri field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CreateUserResponse) GetUriOk() (ret CreateUserResponseGetUriRetType, ok bool) {
|
|
return getCreateUserResponseGetUriAttributeTypeOk(o.Uri)
|
|
}
|
|
|
|
// SetUri sets field value
|
|
func (o *CreateUserResponse) SetUri(v CreateUserResponseGetUriRetType) {
|
|
setCreateUserResponseGetUriAttributeType(&o.Uri, v)
|
|
}
|
|
|
|
// GetUsername returns the Username field value
|
|
func (o *CreateUserResponse) GetUsername() (ret CreateUserResponseGetUsernameRetType) {
|
|
ret, _ = o.GetUsernameOk()
|
|
return ret
|
|
}
|
|
|
|
// GetUsernameOk returns a tuple with the Username field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CreateUserResponse) GetUsernameOk() (ret CreateUserResponseGetUsernameRetType, ok bool) {
|
|
return getCreateUserResponseGetUsernameAttributeTypeOk(o.Username)
|
|
}
|
|
|
|
// SetUsername sets field value
|
|
func (o *CreateUserResponse) SetUsername(v CreateUserResponseGetUsernameRetType) {
|
|
setCreateUserResponseGetUsernameAttributeType(&o.Username, v)
|
|
}
|
|
|
|
func (o CreateUserResponse) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getCreateUserResponseGetDefaultDatabaseAttributeTypeOk(o.DefaultDatabase); ok {
|
|
toSerialize["DefaultDatabase"] = val
|
|
}
|
|
if val, ok := getCreateUserResponseGetHostAttributeTypeOk(o.Host); ok {
|
|
toSerialize["Host"] = val
|
|
}
|
|
if val, ok := getCreateUserResponseGetIdAttributeTypeOk(o.Id); ok {
|
|
toSerialize["Id"] = val
|
|
}
|
|
if val, ok := getCreateUserResponseGetPasswordAttributeTypeOk(o.Password); ok {
|
|
toSerialize["Password"] = val
|
|
}
|
|
if val, ok := getCreateUserResponseGetPortAttributeTypeOk(o.Port); ok {
|
|
toSerialize["Port"] = val
|
|
}
|
|
if val, ok := getCreateUserResponseGetRolesAttributeTypeOk(o.Roles); ok {
|
|
toSerialize["Roles"] = val
|
|
}
|
|
if val, ok := getCreateUserResponseGetStatusAttributeTypeOk(o.Status); ok {
|
|
toSerialize["Status"] = val
|
|
}
|
|
if val, ok := getCreateUserResponseGetUriAttributeTypeOk(o.Uri); ok {
|
|
toSerialize["Uri"] = val
|
|
}
|
|
if val, ok := getCreateUserResponseGetUsernameAttributeTypeOk(o.Username); ok {
|
|
toSerialize["Username"] = 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)
|
|
}
|