/* 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 GetDatabaseResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &GetDatabaseResponse{} /* types and functions for collationName */ // isNotNullableString type GetDatabaseResponseGetCollationNameAttributeType = *string func getGetDatabaseResponseGetCollationNameAttributeTypeOk(arg GetDatabaseResponseGetCollationNameAttributeType) (ret GetDatabaseResponseGetCollationNameRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setGetDatabaseResponseGetCollationNameAttributeType(arg *GetDatabaseResponseGetCollationNameAttributeType, val GetDatabaseResponseGetCollationNameRetType) { *arg = &val } type GetDatabaseResponseGetCollationNameArgType = string type GetDatabaseResponseGetCollationNameRetType = string /* types and functions for compatibilityLevel */ // isInteger type GetDatabaseResponseGetCompatibilityLevelAttributeType = *int64 type GetDatabaseResponseGetCompatibilityLevelArgType = int64 type GetDatabaseResponseGetCompatibilityLevelRetType = int64 func getGetDatabaseResponseGetCompatibilityLevelAttributeTypeOk(arg GetDatabaseResponseGetCompatibilityLevelAttributeType) (ret GetDatabaseResponseGetCompatibilityLevelRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setGetDatabaseResponseGetCompatibilityLevelAttributeType(arg *GetDatabaseResponseGetCompatibilityLevelAttributeType, val GetDatabaseResponseGetCompatibilityLevelRetType) { *arg = &val } /* types and functions for id */ // isLong type GetDatabaseResponseGetIdAttributeType = *int64 type GetDatabaseResponseGetIdArgType = int64 type GetDatabaseResponseGetIdRetType = int64 func getGetDatabaseResponseGetIdAttributeTypeOk(arg GetDatabaseResponseGetIdAttributeType) (ret GetDatabaseResponseGetIdRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setGetDatabaseResponseGetIdAttributeType(arg *GetDatabaseResponseGetIdAttributeType, val GetDatabaseResponseGetIdRetType) { *arg = &val } /* types and functions for name */ // isNotNullableString type GetDatabaseResponseGetNameAttributeType = *string func getGetDatabaseResponseGetNameAttributeTypeOk(arg GetDatabaseResponseGetNameAttributeType) (ret GetDatabaseResponseGetNameRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setGetDatabaseResponseGetNameAttributeType(arg *GetDatabaseResponseGetNameAttributeType, val GetDatabaseResponseGetNameRetType) { *arg = &val } type GetDatabaseResponseGetNameArgType = string type GetDatabaseResponseGetNameRetType = string /* types and functions for owner */ // isNotNullableString type GetDatabaseResponseGetOwnerAttributeType = *string func getGetDatabaseResponseGetOwnerAttributeTypeOk(arg GetDatabaseResponseGetOwnerAttributeType) (ret GetDatabaseResponseGetOwnerRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setGetDatabaseResponseGetOwnerAttributeType(arg *GetDatabaseResponseGetOwnerAttributeType, val GetDatabaseResponseGetOwnerRetType) { *arg = &val } type GetDatabaseResponseGetOwnerArgType = string type GetDatabaseResponseGetOwnerRetType = string // GetDatabaseResponse struct for GetDatabaseResponse type GetDatabaseResponse struct { // The collation of the database. This database collation should match the *collation_name* of one of the collations given by the **Get database collation list** endpoint. // REQUIRED CollationName GetDatabaseResponseGetCollationNameAttributeType `json:"collationName" required:"true"` // CompatibilityLevel of the Database. // Can be cast to int32 without loss of precision. // REQUIRED CompatibilityLevel GetDatabaseResponseGetCompatibilityLevelAttributeType `json:"compatibilityLevel" required:"true"` // The id of the database. // REQUIRED Id GetDatabaseResponseGetIdAttributeType `json:"id" required:"true"` // The name of the database. // REQUIRED Name GetDatabaseResponseGetNameAttributeType `json:"name" required:"true"` // The owner of the database. // REQUIRED Owner GetDatabaseResponseGetOwnerAttributeType `json:"owner" required:"true"` } type _GetDatabaseResponse GetDatabaseResponse // NewGetDatabaseResponse instantiates a new GetDatabaseResponse 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 NewGetDatabaseResponse(collationName GetDatabaseResponseGetCollationNameArgType, compatibilityLevel GetDatabaseResponseGetCompatibilityLevelArgType, id GetDatabaseResponseGetIdArgType, name GetDatabaseResponseGetNameArgType, owner GetDatabaseResponseGetOwnerArgType) *GetDatabaseResponse { this := GetDatabaseResponse{} setGetDatabaseResponseGetCollationNameAttributeType(&this.CollationName, collationName) setGetDatabaseResponseGetCompatibilityLevelAttributeType(&this.CompatibilityLevel, compatibilityLevel) setGetDatabaseResponseGetIdAttributeType(&this.Id, id) setGetDatabaseResponseGetNameAttributeType(&this.Name, name) setGetDatabaseResponseGetOwnerAttributeType(&this.Owner, owner) return &this } // NewGetDatabaseResponseWithDefaults instantiates a new GetDatabaseResponse 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 NewGetDatabaseResponseWithDefaults() *GetDatabaseResponse { this := GetDatabaseResponse{} return &this } // GetCollationName returns the CollationName field value func (o *GetDatabaseResponse) GetCollationName() (ret GetDatabaseResponseGetCollationNameRetType) { ret, _ = o.GetCollationNameOk() return ret } // GetCollationNameOk returns a tuple with the CollationName field value // and a boolean to check if the value has been set. func (o *GetDatabaseResponse) GetCollationNameOk() (ret GetDatabaseResponseGetCollationNameRetType, ok bool) { return getGetDatabaseResponseGetCollationNameAttributeTypeOk(o.CollationName) } // SetCollationName sets field value func (o *GetDatabaseResponse) SetCollationName(v GetDatabaseResponseGetCollationNameRetType) { setGetDatabaseResponseGetCollationNameAttributeType(&o.CollationName, v) } // GetCompatibilityLevel returns the CompatibilityLevel field value func (o *GetDatabaseResponse) GetCompatibilityLevel() (ret GetDatabaseResponseGetCompatibilityLevelRetType) { ret, _ = o.GetCompatibilityLevelOk() return ret } // GetCompatibilityLevelOk returns a tuple with the CompatibilityLevel field value // and a boolean to check if the value has been set. func (o *GetDatabaseResponse) GetCompatibilityLevelOk() (ret GetDatabaseResponseGetCompatibilityLevelRetType, ok bool) { return getGetDatabaseResponseGetCompatibilityLevelAttributeTypeOk(o.CompatibilityLevel) } // SetCompatibilityLevel sets field value func (o *GetDatabaseResponse) SetCompatibilityLevel(v GetDatabaseResponseGetCompatibilityLevelRetType) { setGetDatabaseResponseGetCompatibilityLevelAttributeType(&o.CompatibilityLevel, v) } // GetId returns the Id field value func (o *GetDatabaseResponse) GetId() (ret GetDatabaseResponseGetIdRetType) { 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 *GetDatabaseResponse) GetIdOk() (ret GetDatabaseResponseGetIdRetType, ok bool) { return getGetDatabaseResponseGetIdAttributeTypeOk(o.Id) } // SetId sets field value func (o *GetDatabaseResponse) SetId(v GetDatabaseResponseGetIdRetType) { setGetDatabaseResponseGetIdAttributeType(&o.Id, v) } // GetName returns the Name field value func (o *GetDatabaseResponse) GetName() (ret GetDatabaseResponseGetNameRetType) { 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 *GetDatabaseResponse) GetNameOk() (ret GetDatabaseResponseGetNameRetType, ok bool) { return getGetDatabaseResponseGetNameAttributeTypeOk(o.Name) } // SetName sets field value func (o *GetDatabaseResponse) SetName(v GetDatabaseResponseGetNameRetType) { setGetDatabaseResponseGetNameAttributeType(&o.Name, v) } // GetOwner returns the Owner field value func (o *GetDatabaseResponse) GetOwner() (ret GetDatabaseResponseGetOwnerRetType) { ret, _ = o.GetOwnerOk() return ret } // GetOwnerOk returns a tuple with the Owner field value // and a boolean to check if the value has been set. func (o *GetDatabaseResponse) GetOwnerOk() (ret GetDatabaseResponseGetOwnerRetType, ok bool) { return getGetDatabaseResponseGetOwnerAttributeTypeOk(o.Owner) } // SetOwner sets field value func (o *GetDatabaseResponse) SetOwner(v GetDatabaseResponseGetOwnerRetType) { setGetDatabaseResponseGetOwnerAttributeType(&o.Owner, v) } func (o GetDatabaseResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getGetDatabaseResponseGetCollationNameAttributeTypeOk(o.CollationName); ok { toSerialize["CollationName"] = val } if val, ok := getGetDatabaseResponseGetCompatibilityLevelAttributeTypeOk(o.CompatibilityLevel); ok { toSerialize["CompatibilityLevel"] = val } if val, ok := getGetDatabaseResponseGetIdAttributeTypeOk(o.Id); ok { toSerialize["Id"] = val } if val, ok := getGetDatabaseResponseGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } if val, ok := getGetDatabaseResponseGetOwnerAttributeTypeOk(o.Owner); ok { toSerialize["Owner"] = val } return toSerialize, nil } type NullableGetDatabaseResponse struct { value *GetDatabaseResponse isSet bool } func (v NullableGetDatabaseResponse) Get() *GetDatabaseResponse { return v.value } func (v *NullableGetDatabaseResponse) Set(val *GetDatabaseResponse) { v.value = val v.isSet = true } func (v NullableGetDatabaseResponse) IsSet() bool { return v.isSet } func (v *NullableGetDatabaseResponse) Unset() { v.value = nil v.isSet = false } func NewNullableGetDatabaseResponse(val *GetDatabaseResponse) *NullableGetDatabaseResponse { return &NullableGetDatabaseResponse{value: val, isSet: true} } func (v NullableGetDatabaseResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableGetDatabaseResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }