## Description
<!-- **Please link some issue here describing what you are trying to achieve.**
In case there is no issue present for your PR, please consider creating one.
At least please give us some description what you are trying to achieve and why your change is needed. -->
relates to #1234
## Checklist
- [ ] Issue was linked above
- [ ] Code format was applied: `make fmt`
- [ ] Examples were added / adjusted (see `examples/` directory)
- [x] Docs are up-to-date: `make generate-docs` (will be checked by CI)
- [ ] Unit tests got implemented or updated
- [ ] Acceptance tests got implemented or updated (see e.g. [here](f5f99d1709/stackit/internal/services/dns/dns_acc_test.go))
- [x] Unit tests are passing: `make test` (will be checked by CI)
- [x] No linter issues: `make lint` (will be checked by CI)
Reviewed-on: #4
Reviewed-by: Andre_Harms <andre.harms@stackit.cloud>
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-committed-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
171 lines
5.3 KiB
Go
171 lines
5.3 KiB
Go
/*
|
|
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)
|
|
}
|