mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
5.4 KiB
Go
193 lines
5.4 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 ProviderCredentialOut type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ProviderCredentialOut{}
|
|
|
|
// ProviderCredentialOut struct for ProviderCredentialOut
|
|
type ProviderCredentialOut struct {
|
|
// Connected is always true — a failed verification is a 400 and stores nothing.
|
|
Connected *bool `json:"connected,omitempty"`
|
|
// Connection is the connector as it now stands.
|
|
Connector *ProviderConnectionView `json:"connector,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ProviderCredentialOut ProviderCredentialOut
|
|
|
|
// NewProviderCredentialOut instantiates a new ProviderCredentialOut 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 NewProviderCredentialOut() *ProviderCredentialOut {
|
|
this := ProviderCredentialOut{}
|
|
return &this
|
|
}
|
|
|
|
// NewProviderCredentialOutWithDefaults instantiates a new ProviderCredentialOut 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 NewProviderCredentialOutWithDefaults() *ProviderCredentialOut {
|
|
this := ProviderCredentialOut{}
|
|
return &this
|
|
}
|
|
|
|
// GetConnected returns the Connected field value if set, zero value otherwise.
|
|
func (o *ProviderCredentialOut) GetConnected() bool {
|
|
if o == nil || IsNil(o.Connected) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Connected
|
|
}
|
|
|
|
// GetConnectedOk returns a tuple with the Connected field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderCredentialOut) GetConnectedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Connected) {
|
|
return nil, false
|
|
}
|
|
return o.Connected, true
|
|
}
|
|
|
|
// HasConnected returns a boolean if a field has been set.
|
|
func (o *ProviderCredentialOut) HasConnected() bool {
|
|
if o != nil && !IsNil(o.Connected) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetConnected gets a reference to the given bool and assigns it to the Connected field.
|
|
func (o *ProviderCredentialOut) SetConnected(v bool) {
|
|
o.Connected = &v
|
|
}
|
|
|
|
// GetConnector returns the Connector field value if set, zero value otherwise.
|
|
func (o *ProviderCredentialOut) GetConnector() ProviderConnectionView {
|
|
if o == nil || IsNil(o.Connector) {
|
|
var ret ProviderConnectionView
|
|
return ret
|
|
}
|
|
return *o.Connector
|
|
}
|
|
|
|
// GetConnectorOk returns a tuple with the Connector field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderCredentialOut) GetConnectorOk() (*ProviderConnectionView, bool) {
|
|
if o == nil || IsNil(o.Connector) {
|
|
return nil, false
|
|
}
|
|
return o.Connector, true
|
|
}
|
|
|
|
// HasConnector returns a boolean if a field has been set.
|
|
func (o *ProviderCredentialOut) HasConnector() bool {
|
|
if o != nil && !IsNil(o.Connector) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetConnector gets a reference to the given ProviderConnectionView and assigns it to the Connector field.
|
|
func (o *ProviderCredentialOut) SetConnector(v ProviderConnectionView) {
|
|
o.Connector = &v
|
|
}
|
|
|
|
func (o ProviderCredentialOut) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ProviderCredentialOut) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Connected) {
|
|
toSerialize["connected"] = o.Connected
|
|
}
|
|
if !IsNil(o.Connector) {
|
|
toSerialize["connector"] = o.Connector
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ProviderCredentialOut) UnmarshalJSON(data []byte) (err error) {
|
|
varProviderCredentialOut := _ProviderCredentialOut{}
|
|
|
|
err = json.Unmarshal(data, &varProviderCredentialOut)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ProviderCredentialOut(varProviderCredentialOut)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "connected")
|
|
delete(additionalProperties, "connector")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableProviderCredentialOut struct {
|
|
value *ProviderCredentialOut
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableProviderCredentialOut) Get() *ProviderCredentialOut {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableProviderCredentialOut) Set(val *ProviderCredentialOut) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableProviderCredentialOut) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableProviderCredentialOut) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableProviderCredentialOut(val *ProviderCredentialOut) *NullableProviderCredentialOut {
|
|
return &NullableProviderCredentialOut{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableProviderCredentialOut) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableProviderCredentialOut) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|