mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
6.2 KiB
Go
231 lines
6.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 ProviderOauthBundleIn type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ProviderOauthBundleIn{}
|
|
|
|
// ProviderOauthBundleIn struct for ProviderOauthBundleIn
|
|
type ProviderOauthBundleIn struct {
|
|
// Access is the access token.
|
|
Access *string `json:"access,omitempty"`
|
|
// Account is the account label the flow reported; sanitized on ingest.
|
|
Account *string `json:"account,omitempty"`
|
|
// Refresh is the refresh token. It is sealed and NEVER handed back out.
|
|
Refresh *string `json:"refresh,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ProviderOauthBundleIn ProviderOauthBundleIn
|
|
|
|
// NewProviderOauthBundleIn instantiates a new ProviderOauthBundleIn 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 NewProviderOauthBundleIn() *ProviderOauthBundleIn {
|
|
this := ProviderOauthBundleIn{}
|
|
return &this
|
|
}
|
|
|
|
// NewProviderOauthBundleInWithDefaults instantiates a new ProviderOauthBundleIn 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 NewProviderOauthBundleInWithDefaults() *ProviderOauthBundleIn {
|
|
this := ProviderOauthBundleIn{}
|
|
return &this
|
|
}
|
|
|
|
// GetAccess returns the Access field value if set, zero value otherwise.
|
|
func (o *ProviderOauthBundleIn) GetAccess() string {
|
|
if o == nil || IsNil(o.Access) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Access
|
|
}
|
|
|
|
// GetAccessOk returns a tuple with the Access field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderOauthBundleIn) GetAccessOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Access) {
|
|
return nil, false
|
|
}
|
|
return o.Access, true
|
|
}
|
|
|
|
// HasAccess returns a boolean if a field has been set.
|
|
func (o *ProviderOauthBundleIn) HasAccess() bool {
|
|
if o != nil && !IsNil(o.Access) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAccess gets a reference to the given string and assigns it to the Access field.
|
|
func (o *ProviderOauthBundleIn) SetAccess(v string) {
|
|
o.Access = &v
|
|
}
|
|
|
|
// GetAccount returns the Account field value if set, zero value otherwise.
|
|
func (o *ProviderOauthBundleIn) 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 *ProviderOauthBundleIn) 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 *ProviderOauthBundleIn) 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 *ProviderOauthBundleIn) SetAccount(v string) {
|
|
o.Account = &v
|
|
}
|
|
|
|
// GetRefresh returns the Refresh field value if set, zero value otherwise.
|
|
func (o *ProviderOauthBundleIn) GetRefresh() string {
|
|
if o == nil || IsNil(o.Refresh) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Refresh
|
|
}
|
|
|
|
// GetRefreshOk returns a tuple with the Refresh field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderOauthBundleIn) GetRefreshOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Refresh) {
|
|
return nil, false
|
|
}
|
|
return o.Refresh, true
|
|
}
|
|
|
|
// HasRefresh returns a boolean if a field has been set.
|
|
func (o *ProviderOauthBundleIn) HasRefresh() bool {
|
|
if o != nil && !IsNil(o.Refresh) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRefresh gets a reference to the given string and assigns it to the Refresh field.
|
|
func (o *ProviderOauthBundleIn) SetRefresh(v string) {
|
|
o.Refresh = &v
|
|
}
|
|
|
|
func (o ProviderOauthBundleIn) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ProviderOauthBundleIn) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Access) {
|
|
toSerialize["access"] = o.Access
|
|
}
|
|
if !IsNil(o.Account) {
|
|
toSerialize["account"] = o.Account
|
|
}
|
|
if !IsNil(o.Refresh) {
|
|
toSerialize["refresh"] = o.Refresh
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ProviderOauthBundleIn) UnmarshalJSON(data []byte) (err error) {
|
|
varProviderOauthBundleIn := _ProviderOauthBundleIn{}
|
|
|
|
err = json.Unmarshal(data, &varProviderOauthBundleIn)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ProviderOauthBundleIn(varProviderOauthBundleIn)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "access")
|
|
delete(additionalProperties, "account")
|
|
delete(additionalProperties, "refresh")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableProviderOauthBundleIn struct {
|
|
value *ProviderOauthBundleIn
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableProviderOauthBundleIn) Get() *ProviderOauthBundleIn {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableProviderOauthBundleIn) Set(val *ProviderOauthBundleIn) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableProviderOauthBundleIn) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableProviderOauthBundleIn) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableProviderOauthBundleIn(val *ProviderOauthBundleIn) *NullableProviderOauthBundleIn {
|
|
return &NullableProviderOauthBundleIn{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableProviderOauthBundleIn) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableProviderOauthBundleIn) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|