terraform-provider-stackitp.../pkg/sqlserverflexalpha/model_version.go

260 lines
7.3 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 Version type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Version{}
/*
types and functions for beta
*/
// isBoolean
type VersiongetBetaAttributeType = *bool
type VersiongetBetaArgType = bool
type VersiongetBetaRetType = bool
func getVersiongetBetaAttributeTypeOk(arg VersiongetBetaAttributeType) (ret VersiongetBetaRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setVersiongetBetaAttributeType(arg *VersiongetBetaAttributeType, val VersiongetBetaRetType) {
*arg = &val
}
/*
types and functions for deprecated
*/
// isNotNullableString
type VersionGetDeprecatedAttributeType = *string
func getVersionGetDeprecatedAttributeTypeOk(arg VersionGetDeprecatedAttributeType) (ret VersionGetDeprecatedRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setVersionGetDeprecatedAttributeType(arg *VersionGetDeprecatedAttributeType, val VersionGetDeprecatedRetType) {
*arg = &val
}
type VersionGetDeprecatedArgType = string
type VersionGetDeprecatedRetType = string
/*
types and functions for recommend
*/
// isBoolean
type VersiongetRecommendAttributeType = *bool
type VersiongetRecommendArgType = bool
type VersiongetRecommendRetType = bool
func getVersiongetRecommendAttributeTypeOk(arg VersiongetRecommendAttributeType) (ret VersiongetRecommendRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setVersiongetRecommendAttributeType(arg *VersiongetRecommendAttributeType, val VersiongetRecommendRetType) {
*arg = &val
}
/*
types and functions for version
*/
// isNotNullableString
type VersionGetVersionAttributeType = *string
func getVersionGetVersionAttributeTypeOk(arg VersionGetVersionAttributeType) (ret VersionGetVersionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setVersionGetVersionAttributeType(arg *VersionGetVersionAttributeType, val VersionGetVersionRetType) {
*arg = &val
}
type VersionGetVersionArgType = string
type VersionGetVersionRetType = string
// Version The version of the sqlserver instance and more details.
type Version struct {
// Flag if the version is a beta version. If set the version may contain bugs and is not fully tested.
// REQUIRED
Beta VersiongetBetaAttributeType `json:"beta" required:"true"`
// Timestamp in RFC3339 format which says when the version will no longer be supported by STACKIT.
// REQUIRED
Deprecated VersionGetDeprecatedAttributeType `json:"deprecated" required:"true"`
// Flag if the version is recommend by the STACKIT Team.
// REQUIRED
Recommend VersiongetRecommendAttributeType `json:"recommend" required:"true"`
// The sqlserver version used for the instance.
// REQUIRED
Version VersionGetVersionAttributeType `json:"version" required:"true"`
}
type _Version Version
// NewVersion instantiates a new Version 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 NewVersion(beta VersiongetBetaArgType, deprecated VersionGetDeprecatedArgType, recommend VersiongetRecommendArgType, version VersionGetVersionArgType) *Version {
this := Version{}
setVersiongetBetaAttributeType(&this.Beta, beta)
setVersionGetDeprecatedAttributeType(&this.Deprecated, deprecated)
setVersiongetRecommendAttributeType(&this.Recommend, recommend)
setVersionGetVersionAttributeType(&this.Version, version)
return &this
}
// NewVersionWithDefaults instantiates a new Version 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 NewVersionWithDefaults() *Version {
this := Version{}
return &this
}
// GetBeta returns the Beta field value
func (o *Version) GetBeta() (ret VersiongetBetaRetType) {
ret, _ = o.GetBetaOk()
return ret
}
// GetBetaOk returns a tuple with the Beta field value
// and a boolean to check if the value has been set.
func (o *Version) GetBetaOk() (ret VersiongetBetaRetType, ok bool) {
return getVersiongetBetaAttributeTypeOk(o.Beta)
}
// SetBeta sets field value
func (o *Version) SetBeta(v VersiongetBetaRetType) {
setVersiongetBetaAttributeType(&o.Beta, v)
}
// GetDeprecated returns the Deprecated field value
func (o *Version) GetDeprecated() (ret VersionGetDeprecatedRetType) {
ret, _ = o.GetDeprecatedOk()
return ret
}
// GetDeprecatedOk returns a tuple with the Deprecated field value
// and a boolean to check if the value has been set.
func (o *Version) GetDeprecatedOk() (ret VersionGetDeprecatedRetType, ok bool) {
return getVersionGetDeprecatedAttributeTypeOk(o.Deprecated)
}
// SetDeprecated sets field value
func (o *Version) SetDeprecated(v VersionGetDeprecatedRetType) {
setVersionGetDeprecatedAttributeType(&o.Deprecated, v)
}
// GetRecommend returns the Recommend field value
func (o *Version) GetRecommend() (ret VersiongetRecommendRetType) {
ret, _ = o.GetRecommendOk()
return ret
}
// GetRecommendOk returns a tuple with the Recommend field value
// and a boolean to check if the value has been set.
func (o *Version) GetRecommendOk() (ret VersiongetRecommendRetType, ok bool) {
return getVersiongetRecommendAttributeTypeOk(o.Recommend)
}
// SetRecommend sets field value
func (o *Version) SetRecommend(v VersiongetRecommendRetType) {
setVersiongetRecommendAttributeType(&o.Recommend, v)
}
// GetVersion returns the Version field value
func (o *Version) GetVersion() (ret VersionGetVersionRetType) {
ret, _ = o.GetVersionOk()
return ret
}
// GetVersionOk returns a tuple with the Version field value
// and a boolean to check if the value has been set.
func (o *Version) GetVersionOk() (ret VersionGetVersionRetType, ok bool) {
return getVersionGetVersionAttributeTypeOk(o.Version)
}
// SetVersion sets field value
func (o *Version) SetVersion(v VersionGetVersionRetType) {
setVersionGetVersionAttributeType(&o.Version, v)
}
func (o Version) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getVersiongetBetaAttributeTypeOk(o.Beta); ok {
toSerialize["Beta"] = val
}
if val, ok := getVersionGetDeprecatedAttributeTypeOk(o.Deprecated); ok {
toSerialize["Deprecated"] = val
}
if val, ok := getVersiongetRecommendAttributeTypeOk(o.Recommend); ok {
toSerialize["Recommend"] = val
}
if val, ok := getVersionGetVersionAttributeTypeOk(o.Version); ok {
toSerialize["Version"] = val
}
return toSerialize, nil
}
type NullableVersion struct {
value *Version
isSet bool
}
func (v NullableVersion) Get() *Version {
return v.value
}
func (v *NullableVersion) Set(val *Version) {
v.value = val
v.isSet = true
}
func (v NullableVersion) IsSet() bool {
return v.isSet
}
func (v *NullableVersion) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableVersion(val *Version) *NullableVersion {
return &NullableVersion{value: val, isSet: true}
}
func (v NullableVersion) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableVersion) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}