chore: work save
This commit is contained in:
parent
9752d63f7e
commit
2c6d7aa765
3 changed files with 194 additions and 12 deletions
171
pkg/postgresflexalpha/model_instance_connection_info.go
Normal file
171
pkg/postgresflexalpha/model_instance_connection_info.go
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
/*
|
||||
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 InstanceConnectionInfo type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &InstanceConnectionInfo{}
|
||||
|
||||
/*
|
||||
types and functions for host
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type InstanceConnectionInfoGetHostAttributeType = *string
|
||||
|
||||
func getInstanceConnectionInfoGetHostAttributeTypeOk(arg InstanceConnectionInfoGetHostAttributeType) (ret InstanceConnectionInfoGetHostRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setInstanceConnectionInfoGetHostAttributeType(arg *InstanceConnectionInfoGetHostAttributeType, val InstanceConnectionInfoGetHostRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type InstanceConnectionInfoGetHostArgType = string
|
||||
type InstanceConnectionInfoGetHostRetType = string
|
||||
|
||||
/*
|
||||
types and functions for port
|
||||
*/
|
||||
|
||||
// isInteger
|
||||
type InstanceConnectionInfoGetPortAttributeType = *int64
|
||||
type InstanceConnectionInfoGetPortArgType = int64
|
||||
type InstanceConnectionInfoGetPortRetType = int64
|
||||
|
||||
func getInstanceConnectionInfoGetPortAttributeTypeOk(arg InstanceConnectionInfoGetPortAttributeType) (ret InstanceConnectionInfoGetPortRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setInstanceConnectionInfoGetPortAttributeType(arg *InstanceConnectionInfoGetPortAttributeType, val InstanceConnectionInfoGetPortRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// InstanceConnectionInfo The DNS name and port in the instance overview
|
||||
type InstanceConnectionInfo struct {
|
||||
// The host of the instance.
|
||||
// REQUIRED
|
||||
Host InstanceConnectionInfoGetHostAttributeType `json:"host" required:"true"`
|
||||
// The port of the instance.
|
||||
// REQUIRED
|
||||
Port InstanceConnectionInfoGetPortAttributeType `json:"port" required:"true"`
|
||||
}
|
||||
|
||||
type _InstanceConnectionInfo InstanceConnectionInfo
|
||||
|
||||
// NewInstanceConnectionInfo instantiates a new InstanceConnectionInfo 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 NewInstanceConnectionInfo(host InstanceConnectionInfoGetHostArgType, port InstanceConnectionInfoGetPortArgType) *InstanceConnectionInfo {
|
||||
this := InstanceConnectionInfo{}
|
||||
setInstanceConnectionInfoGetHostAttributeType(&this.Host, host)
|
||||
setInstanceConnectionInfoGetPortAttributeType(&this.Port, port)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewInstanceConnectionInfoWithDefaults instantiates a new InstanceConnectionInfo 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 NewInstanceConnectionInfoWithDefaults() *InstanceConnectionInfo {
|
||||
this := InstanceConnectionInfo{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetHost returns the Host field value
|
||||
func (o *InstanceConnectionInfo) GetHost() (ret InstanceConnectionInfoGetHostRetType) {
|
||||
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 *InstanceConnectionInfo) GetHostOk() (ret InstanceConnectionInfoGetHostRetType, ok bool) {
|
||||
return getInstanceConnectionInfoGetHostAttributeTypeOk(o.Host)
|
||||
}
|
||||
|
||||
// SetHost sets field value
|
||||
func (o *InstanceConnectionInfo) SetHost(v InstanceConnectionInfoGetHostRetType) {
|
||||
setInstanceConnectionInfoGetHostAttributeType(&o.Host, v)
|
||||
}
|
||||
|
||||
// GetPort returns the Port field value
|
||||
func (o *InstanceConnectionInfo) GetPort() (ret InstanceConnectionInfoGetPortRetType) {
|
||||
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 *InstanceConnectionInfo) GetPortOk() (ret InstanceConnectionInfoGetPortRetType, ok bool) {
|
||||
return getInstanceConnectionInfoGetPortAttributeTypeOk(o.Port)
|
||||
}
|
||||
|
||||
// SetPort sets field value
|
||||
func (o *InstanceConnectionInfo) SetPort(v InstanceConnectionInfoGetPortRetType) {
|
||||
setInstanceConnectionInfoGetPortAttributeType(&o.Port, v)
|
||||
}
|
||||
|
||||
func (o InstanceConnectionInfo) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getInstanceConnectionInfoGetHostAttributeTypeOk(o.Host); ok {
|
||||
toSerialize["Host"] = val
|
||||
}
|
||||
if val, ok := getInstanceConnectionInfoGetPortAttributeTypeOk(o.Port); ok {
|
||||
toSerialize["Port"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableInstanceConnectionInfo struct {
|
||||
value *InstanceConnectionInfo
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableInstanceConnectionInfo) Get() *InstanceConnectionInfo {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableInstanceConnectionInfo) Set(val *InstanceConnectionInfo) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableInstanceConnectionInfo) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableInstanceConnectionInfo) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableInstanceConnectionInfo(val *InstanceConnectionInfo) *NullableInstanceConnectionInfo {
|
||||
return &NullableInstanceConnectionInfo{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableInstanceConnectionInfo) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableInstanceConnectionInfo) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/postgresflexalpha/model_instance_connection_info_test.go
Normal file
11
pkg/postgresflexalpha/model_instance_connection_info_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue