Files
sdk/model_provisioning_provision_result.go

497 lines
15 KiB
Go

/*
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hanzoai
import (
"encoding/json"
)
// checks if the ProvisioningProvisionResult type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProvisioningProvisionResult{}
// ProvisioningProvisionResult struct for ProvisioningProvisionResult
type ProvisioningProvisionResult struct {
// ConnectionString is the ready-to-use DSN, credential included. RETURNED HERE ONCE: no read beside this one carries it, so a caller that does not keep it must provision again.
ConnectionString *string `json:"connectionString,omitempty"`
// Database is the logical database, collection, index or bucket this resource resolves to on its backend. It is derived from Name under an org-namespacing hash, so it is not Name and two orgs cannot land on one.
Database *string `json:"database,omitempty"`
// Host is the address that routes to this resource — a dedicated instance's own in-cluster Service, or the public gateway for a shared one. Never the internal admin address of a shared backend.
Host *string `json:"host,omitempty"`
// ID is the resource's server-minted handle, \"rs_\"-prefixed. The caller does not choose it, and it is what every read and the delete address.
Id *string `json:"id,omitempty"`
// Kind is the product provisioned: sql, vector, datastore, kv, search, s3 or docdb. It is the route that was called, not a body field.
Kind *string `json:"kind,omitempty"`
// Name is the org-unique slug the caller asked for, lower-cased. Every physical name on the backend derives from it.
Name *string `json:"name,omitempty"`
// Password is the minted credential, in plaintext, for the kinds that have one. RETURNED HERE ONCE — where KMS is configured it is sealed there and only a reference is persisted; where it is not, it is stored nowhere at all. It is never held in plaintext on either side.
Password *string `json:"password,omitempty"`
// Port is the port a client connects to on Host.
Port *int64 `json:"port,omitempty"`
// Status is \"ready\", or \"provisioning\" while a dedicated instance is still being materialized by the operator. A shared-backend create is \"ready\" here; a dedicated one answers 201 still launching, and reaches ready only when a later read reconciles it against the operator's live CR — never fabricated.
Status *string `json:"status,omitempty"`
// Username is the credential's user, for the kinds that mint one per resource. Absent for a kind whose backend authenticates with a shared, out-of-band key.
Username *string `json:"username,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ProvisioningProvisionResult ProvisioningProvisionResult
// NewProvisioningProvisionResult instantiates a new ProvisioningProvisionResult 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 NewProvisioningProvisionResult() *ProvisioningProvisionResult {
this := ProvisioningProvisionResult{}
return &this
}
// NewProvisioningProvisionResultWithDefaults instantiates a new ProvisioningProvisionResult 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 NewProvisioningProvisionResultWithDefaults() *ProvisioningProvisionResult {
this := ProvisioningProvisionResult{}
return &this
}
// GetConnectionString returns the ConnectionString field value if set, zero value otherwise.
func (o *ProvisioningProvisionResult) GetConnectionString() string {
if o == nil || IsNil(o.ConnectionString) {
var ret string
return ret
}
return *o.ConnectionString
}
// GetConnectionStringOk returns a tuple with the ConnectionString field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProvisioningProvisionResult) GetConnectionStringOk() (*string, bool) {
if o == nil || IsNil(o.ConnectionString) {
return nil, false
}
return o.ConnectionString, true
}
// HasConnectionString returns a boolean if a field has been set.
func (o *ProvisioningProvisionResult) HasConnectionString() bool {
if o != nil && !IsNil(o.ConnectionString) {
return true
}
return false
}
// SetConnectionString gets a reference to the given string and assigns it to the ConnectionString field.
func (o *ProvisioningProvisionResult) SetConnectionString(v string) {
o.ConnectionString = &v
}
// GetDatabase returns the Database field value if set, zero value otherwise.
func (o *ProvisioningProvisionResult) GetDatabase() string {
if o == nil || IsNil(o.Database) {
var ret string
return ret
}
return *o.Database
}
// GetDatabaseOk returns a tuple with the Database field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProvisioningProvisionResult) GetDatabaseOk() (*string, bool) {
if o == nil || IsNil(o.Database) {
return nil, false
}
return o.Database, true
}
// HasDatabase returns a boolean if a field has been set.
func (o *ProvisioningProvisionResult) HasDatabase() bool {
if o != nil && !IsNil(o.Database) {
return true
}
return false
}
// SetDatabase gets a reference to the given string and assigns it to the Database field.
func (o *ProvisioningProvisionResult) SetDatabase(v string) {
o.Database = &v
}
// GetHost returns the Host field value if set, zero value otherwise.
func (o *ProvisioningProvisionResult) GetHost() string {
if o == nil || IsNil(o.Host) {
var ret string
return ret
}
return *o.Host
}
// GetHostOk returns a tuple with the Host field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProvisioningProvisionResult) GetHostOk() (*string, bool) {
if o == nil || IsNil(o.Host) {
return nil, false
}
return o.Host, true
}
// HasHost returns a boolean if a field has been set.
func (o *ProvisioningProvisionResult) HasHost() bool {
if o != nil && !IsNil(o.Host) {
return true
}
return false
}
// SetHost gets a reference to the given string and assigns it to the Host field.
func (o *ProvisioningProvisionResult) SetHost(v string) {
o.Host = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *ProvisioningProvisionResult) GetId() string {
if o == nil || IsNil(o.Id) {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProvisioningProvisionResult) GetIdOk() (*string, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *ProvisioningProvisionResult) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *ProvisioningProvisionResult) SetId(v string) {
o.Id = &v
}
// GetKind returns the Kind field value if set, zero value otherwise.
func (o *ProvisioningProvisionResult) GetKind() string {
if o == nil || IsNil(o.Kind) {
var ret string
return ret
}
return *o.Kind
}
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProvisioningProvisionResult) GetKindOk() (*string, bool) {
if o == nil || IsNil(o.Kind) {
return nil, false
}
return o.Kind, true
}
// HasKind returns a boolean if a field has been set.
func (o *ProvisioningProvisionResult) HasKind() bool {
if o != nil && !IsNil(o.Kind) {
return true
}
return false
}
// SetKind gets a reference to the given string and assigns it to the Kind field.
func (o *ProvisioningProvisionResult) SetKind(v string) {
o.Kind = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *ProvisioningProvisionResult) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProvisioningProvisionResult) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *ProvisioningProvisionResult) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *ProvisioningProvisionResult) SetName(v string) {
o.Name = &v
}
// GetPassword returns the Password field value if set, zero value otherwise.
func (o *ProvisioningProvisionResult) GetPassword() string {
if o == nil || IsNil(o.Password) {
var ret string
return ret
}
return *o.Password
}
// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProvisioningProvisionResult) GetPasswordOk() (*string, bool) {
if o == nil || IsNil(o.Password) {
return nil, false
}
return o.Password, true
}
// HasPassword returns a boolean if a field has been set.
func (o *ProvisioningProvisionResult) HasPassword() bool {
if o != nil && !IsNil(o.Password) {
return true
}
return false
}
// SetPassword gets a reference to the given string and assigns it to the Password field.
func (o *ProvisioningProvisionResult) SetPassword(v string) {
o.Password = &v
}
// GetPort returns the Port field value if set, zero value otherwise.
func (o *ProvisioningProvisionResult) GetPort() int64 {
if o == nil || IsNil(o.Port) {
var ret int64
return ret
}
return *o.Port
}
// GetPortOk returns a tuple with the Port field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProvisioningProvisionResult) GetPortOk() (*int64, bool) {
if o == nil || IsNil(o.Port) {
return nil, false
}
return o.Port, true
}
// HasPort returns a boolean if a field has been set.
func (o *ProvisioningProvisionResult) HasPort() bool {
if o != nil && !IsNil(o.Port) {
return true
}
return false
}
// SetPort gets a reference to the given int64 and assigns it to the Port field.
func (o *ProvisioningProvisionResult) SetPort(v int64) {
o.Port = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *ProvisioningProvisionResult) GetStatus() string {
if o == nil || IsNil(o.Status) {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProvisioningProvisionResult) GetStatusOk() (*string, bool) {
if o == nil || IsNil(o.Status) {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *ProvisioningProvisionResult) HasStatus() bool {
if o != nil && !IsNil(o.Status) {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *ProvisioningProvisionResult) SetStatus(v string) {
o.Status = &v
}
// GetUsername returns the Username field value if set, zero value otherwise.
func (o *ProvisioningProvisionResult) GetUsername() string {
if o == nil || IsNil(o.Username) {
var ret string
return ret
}
return *o.Username
}
// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProvisioningProvisionResult) GetUsernameOk() (*string, bool) {
if o == nil || IsNil(o.Username) {
return nil, false
}
return o.Username, true
}
// HasUsername returns a boolean if a field has been set.
func (o *ProvisioningProvisionResult) HasUsername() bool {
if o != nil && !IsNil(o.Username) {
return true
}
return false
}
// SetUsername gets a reference to the given string and assigns it to the Username field.
func (o *ProvisioningProvisionResult) SetUsername(v string) {
o.Username = &v
}
func (o ProvisioningProvisionResult) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ProvisioningProvisionResult) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ConnectionString) {
toSerialize["connectionString"] = o.ConnectionString
}
if !IsNil(o.Database) {
toSerialize["database"] = o.Database
}
if !IsNil(o.Host) {
toSerialize["host"] = o.Host
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Kind) {
toSerialize["kind"] = o.Kind
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Password) {
toSerialize["password"] = o.Password
}
if !IsNil(o.Port) {
toSerialize["port"] = o.Port
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
if !IsNil(o.Username) {
toSerialize["username"] = o.Username
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ProvisioningProvisionResult) UnmarshalJSON(data []byte) (err error) {
varProvisioningProvisionResult := _ProvisioningProvisionResult{}
err = json.Unmarshal(data, &varProvisioningProvisionResult)
if err != nil {
return err
}
*o = ProvisioningProvisionResult(varProvisioningProvisionResult)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "connectionString")
delete(additionalProperties, "database")
delete(additionalProperties, "host")
delete(additionalProperties, "id")
delete(additionalProperties, "kind")
delete(additionalProperties, "name")
delete(additionalProperties, "password")
delete(additionalProperties, "port")
delete(additionalProperties, "status")
delete(additionalProperties, "username")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableProvisioningProvisionResult struct {
value *ProvisioningProvisionResult
isSet bool
}
func (v NullableProvisioningProvisionResult) Get() *ProvisioningProvisionResult {
return v.value
}
func (v *NullableProvisioningProvisionResult) Set(val *ProvisioningProvisionResult) {
v.value = val
v.isSet = true
}
func (v NullableProvisioningProvisionResult) IsSet() bool {
return v.isSet
}
func (v *NullableProvisioningProvisionResult) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProvisioningProvisionResult(val *ProvisioningProvisionResult) *NullableProvisioningProvisionResult {
return &NullableProvisioningProvisionResult{value: val, isSet: true}
}
func (v NullableProvisioningProvisionResult) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProvisioningProvisionResult) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}