Files
sdk/model_provider_verify_out.go

345 lines
9.2 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 ProviderVerifyOut type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProviderVerifyOut{}
// ProviderVerifyOut struct for ProviderVerifyOut
type ProviderVerifyOut struct {
// Account is the account label the provider reported. Present only when active.
Account *string `json:"account,omitempty"`
// Active is whether the stored credential verified live against the provider.
Active *bool `json:"active,omitempty"`
// ExternalID is the provider's account id. Present only when active.
ExternalId *string `json:"externalId,omitempty"`
// Provider is the connector's registry id.
Provider *string `json:"provider,omitempty"`
// Reason is why the check failed. Present only when active is false.
Reason *string `json:"reason,omitempty"`
// Scopes are the permissions the credential carries. Present only when active.
Scopes []string `json:"scopes,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ProviderVerifyOut ProviderVerifyOut
// NewProviderVerifyOut instantiates a new ProviderVerifyOut 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 NewProviderVerifyOut() *ProviderVerifyOut {
this := ProviderVerifyOut{}
return &this
}
// NewProviderVerifyOutWithDefaults instantiates a new ProviderVerifyOut 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 NewProviderVerifyOutWithDefaults() *ProviderVerifyOut {
this := ProviderVerifyOut{}
return &this
}
// GetAccount returns the Account field value if set, zero value otherwise.
func (o *ProviderVerifyOut) GetAccount() string {
if o == nil || IsNil(o.Account) {
var ret string
return ret
}
return *o.Account
}
// GetAccountOk returns a tuple with the Account field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProviderVerifyOut) GetAccountOk() (*string, bool) {
if o == nil || IsNil(o.Account) {
return nil, false
}
return o.Account, true
}
// HasAccount returns a boolean if a field has been set.
func (o *ProviderVerifyOut) HasAccount() bool {
if o != nil && !IsNil(o.Account) {
return true
}
return false
}
// SetAccount gets a reference to the given string and assigns it to the Account field.
func (o *ProviderVerifyOut) SetAccount(v string) {
o.Account = &v
}
// GetActive returns the Active field value if set, zero value otherwise.
func (o *ProviderVerifyOut) GetActive() bool {
if o == nil || IsNil(o.Active) {
var ret bool
return ret
}
return *o.Active
}
// GetActiveOk returns a tuple with the Active field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProviderVerifyOut) GetActiveOk() (*bool, bool) {
if o == nil || IsNil(o.Active) {
return nil, false
}
return o.Active, true
}
// HasActive returns a boolean if a field has been set.
func (o *ProviderVerifyOut) HasActive() bool {
if o != nil && !IsNil(o.Active) {
return true
}
return false
}
// SetActive gets a reference to the given bool and assigns it to the Active field.
func (o *ProviderVerifyOut) SetActive(v bool) {
o.Active = &v
}
// GetExternalId returns the ExternalId field value if set, zero value otherwise.
func (o *ProviderVerifyOut) GetExternalId() string {
if o == nil || IsNil(o.ExternalId) {
var ret string
return ret
}
return *o.ExternalId
}
// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProviderVerifyOut) GetExternalIdOk() (*string, bool) {
if o == nil || IsNil(o.ExternalId) {
return nil, false
}
return o.ExternalId, true
}
// HasExternalId returns a boolean if a field has been set.
func (o *ProviderVerifyOut) HasExternalId() bool {
if o != nil && !IsNil(o.ExternalId) {
return true
}
return false
}
// SetExternalId gets a reference to the given string and assigns it to the ExternalId field.
func (o *ProviderVerifyOut) SetExternalId(v string) {
o.ExternalId = &v
}
// GetProvider returns the Provider field value if set, zero value otherwise.
func (o *ProviderVerifyOut) GetProvider() string {
if o == nil || IsNil(o.Provider) {
var ret string
return ret
}
return *o.Provider
}
// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProviderVerifyOut) GetProviderOk() (*string, bool) {
if o == nil || IsNil(o.Provider) {
return nil, false
}
return o.Provider, true
}
// HasProvider returns a boolean if a field has been set.
func (o *ProviderVerifyOut) HasProvider() bool {
if o != nil && !IsNil(o.Provider) {
return true
}
return false
}
// SetProvider gets a reference to the given string and assigns it to the Provider field.
func (o *ProviderVerifyOut) SetProvider(v string) {
o.Provider = &v
}
// GetReason returns the Reason field value if set, zero value otherwise.
func (o *ProviderVerifyOut) GetReason() string {
if o == nil || IsNil(o.Reason) {
var ret string
return ret
}
return *o.Reason
}
// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProviderVerifyOut) GetReasonOk() (*string, bool) {
if o == nil || IsNil(o.Reason) {
return nil, false
}
return o.Reason, true
}
// HasReason returns a boolean if a field has been set.
func (o *ProviderVerifyOut) HasReason() bool {
if o != nil && !IsNil(o.Reason) {
return true
}
return false
}
// SetReason gets a reference to the given string and assigns it to the Reason field.
func (o *ProviderVerifyOut) SetReason(v string) {
o.Reason = &v
}
// GetScopes returns the Scopes field value if set, zero value otherwise.
func (o *ProviderVerifyOut) GetScopes() []string {
if o == nil || IsNil(o.Scopes) {
var ret []string
return ret
}
return o.Scopes
}
// GetScopesOk returns a tuple with the Scopes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProviderVerifyOut) GetScopesOk() ([]string, bool) {
if o == nil || IsNil(o.Scopes) {
return nil, false
}
return o.Scopes, true
}
// HasScopes returns a boolean if a field has been set.
func (o *ProviderVerifyOut) HasScopes() bool {
if o != nil && !IsNil(o.Scopes) {
return true
}
return false
}
// SetScopes gets a reference to the given []string and assigns it to the Scopes field.
func (o *ProviderVerifyOut) SetScopes(v []string) {
o.Scopes = v
}
func (o ProviderVerifyOut) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ProviderVerifyOut) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Account) {
toSerialize["account"] = o.Account
}
if !IsNil(o.Active) {
toSerialize["active"] = o.Active
}
if !IsNil(o.ExternalId) {
toSerialize["externalId"] = o.ExternalId
}
if !IsNil(o.Provider) {
toSerialize["provider"] = o.Provider
}
if !IsNil(o.Reason) {
toSerialize["reason"] = o.Reason
}
if !IsNil(o.Scopes) {
toSerialize["scopes"] = o.Scopes
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ProviderVerifyOut) UnmarshalJSON(data []byte) (err error) {
varProviderVerifyOut := _ProviderVerifyOut{}
err = json.Unmarshal(data, &varProviderVerifyOut)
if err != nil {
return err
}
*o = ProviderVerifyOut(varProviderVerifyOut)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "account")
delete(additionalProperties, "active")
delete(additionalProperties, "externalId")
delete(additionalProperties, "provider")
delete(additionalProperties, "reason")
delete(additionalProperties, "scopes")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableProviderVerifyOut struct {
value *ProviderVerifyOut
isSet bool
}
func (v NullableProviderVerifyOut) Get() *ProviderVerifyOut {
return v.value
}
func (v *NullableProviderVerifyOut) Set(val *ProviderVerifyOut) {
v.value = val
v.isSet = true
}
func (v NullableProviderVerifyOut) IsSet() bool {
return v.isSet
}
func (v *NullableProviderVerifyOut) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProviderVerifyOut(val *ProviderVerifyOut) *NullableProviderVerifyOut {
return &NullableProviderVerifyOut{value: val, isSet: true}
}
func (v NullableProviderVerifyOut) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProviderVerifyOut) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}