Files
sdk/model_provider_authorize_out.go

155 lines
4.3 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 ProviderAuthorizeOut type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProviderAuthorizeOut{}
// ProviderAuthorizeOut struct for ProviderAuthorizeOut
type ProviderAuthorizeOut struct {
// AuthorizeURL is the provider consent (or bot deep-link) URL.
AuthorizeUrl *string `json:"authorizeUrl,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ProviderAuthorizeOut ProviderAuthorizeOut
// NewProviderAuthorizeOut instantiates a new ProviderAuthorizeOut 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 NewProviderAuthorizeOut() *ProviderAuthorizeOut {
this := ProviderAuthorizeOut{}
return &this
}
// NewProviderAuthorizeOutWithDefaults instantiates a new ProviderAuthorizeOut 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 NewProviderAuthorizeOutWithDefaults() *ProviderAuthorizeOut {
this := ProviderAuthorizeOut{}
return &this
}
// GetAuthorizeUrl returns the AuthorizeUrl field value if set, zero value otherwise.
func (o *ProviderAuthorizeOut) GetAuthorizeUrl() string {
if o == nil || IsNil(o.AuthorizeUrl) {
var ret string
return ret
}
return *o.AuthorizeUrl
}
// GetAuthorizeUrlOk returns a tuple with the AuthorizeUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProviderAuthorizeOut) GetAuthorizeUrlOk() (*string, bool) {
if o == nil || IsNil(o.AuthorizeUrl) {
return nil, false
}
return o.AuthorizeUrl, true
}
// HasAuthorizeUrl returns a boolean if a field has been set.
func (o *ProviderAuthorizeOut) HasAuthorizeUrl() bool {
if o != nil && !IsNil(o.AuthorizeUrl) {
return true
}
return false
}
// SetAuthorizeUrl gets a reference to the given string and assigns it to the AuthorizeUrl field.
func (o *ProviderAuthorizeOut) SetAuthorizeUrl(v string) {
o.AuthorizeUrl = &v
}
func (o ProviderAuthorizeOut) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ProviderAuthorizeOut) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.AuthorizeUrl) {
toSerialize["authorizeUrl"] = o.AuthorizeUrl
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ProviderAuthorizeOut) UnmarshalJSON(data []byte) (err error) {
varProviderAuthorizeOut := _ProviderAuthorizeOut{}
err = json.Unmarshal(data, &varProviderAuthorizeOut)
if err != nil {
return err
}
*o = ProviderAuthorizeOut(varProviderAuthorizeOut)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "authorizeUrl")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableProviderAuthorizeOut struct {
value *ProviderAuthorizeOut
isSet bool
}
func (v NullableProviderAuthorizeOut) Get() *ProviderAuthorizeOut {
return v.value
}
func (v *NullableProviderAuthorizeOut) Set(val *ProviderAuthorizeOut) {
v.value = val
v.isSet = true
}
func (v NullableProviderAuthorizeOut) IsSet() bool {
return v.isSet
}
func (v *NullableProviderAuthorizeOut) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProviderAuthorizeOut(val *ProviderAuthorizeOut) *NullableProviderAuthorizeOut {
return &NullableProviderAuthorizeOut{value: val, isSet: true}
}
func (v NullableProviderAuthorizeOut) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProviderAuthorizeOut) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}