Files
sdk/model_provider_google_user_connect_out.go

155 lines
4.8 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 ProviderGoogleUserConnectOut type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProviderGoogleUserConnectOut{}
// ProviderGoogleUserConnectOut struct for ProviderGoogleUserConnectOut
type ProviderGoogleUserConnectOut struct {
// AuthorizeURL is Google's consent page. Google returns the browser to the callback, which parks the answer and sends it on with complete=google&grant=<id> — to the return page the connect named, or the console's /connectors — and that page POSTs the grant to /v1/provider/google/user/complete.
AuthorizeUrl *string `json:"authorizeUrl,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ProviderGoogleUserConnectOut ProviderGoogleUserConnectOut
// NewProviderGoogleUserConnectOut instantiates a new ProviderGoogleUserConnectOut 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 NewProviderGoogleUserConnectOut() *ProviderGoogleUserConnectOut {
this := ProviderGoogleUserConnectOut{}
return &this
}
// NewProviderGoogleUserConnectOutWithDefaults instantiates a new ProviderGoogleUserConnectOut 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 NewProviderGoogleUserConnectOutWithDefaults() *ProviderGoogleUserConnectOut {
this := ProviderGoogleUserConnectOut{}
return &this
}
// GetAuthorizeUrl returns the AuthorizeUrl field value if set, zero value otherwise.
func (o *ProviderGoogleUserConnectOut) 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 *ProviderGoogleUserConnectOut) 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 *ProviderGoogleUserConnectOut) 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 *ProviderGoogleUserConnectOut) SetAuthorizeUrl(v string) {
o.AuthorizeUrl = &v
}
func (o ProviderGoogleUserConnectOut) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ProviderGoogleUserConnectOut) 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 *ProviderGoogleUserConnectOut) UnmarshalJSON(data []byte) (err error) {
varProviderGoogleUserConnectOut := _ProviderGoogleUserConnectOut{}
err = json.Unmarshal(data, &varProviderGoogleUserConnectOut)
if err != nil {
return err
}
*o = ProviderGoogleUserConnectOut(varProviderGoogleUserConnectOut)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "authorizeUrl")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableProviderGoogleUserConnectOut struct {
value *ProviderGoogleUserConnectOut
isSet bool
}
func (v NullableProviderGoogleUserConnectOut) Get() *ProviderGoogleUserConnectOut {
return v.value
}
func (v *NullableProviderGoogleUserConnectOut) Set(val *ProviderGoogleUserConnectOut) {
v.value = val
v.isSet = true
}
func (v NullableProviderGoogleUserConnectOut) IsSet() bool {
return v.isSet
}
func (v *NullableProviderGoogleUserConnectOut) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProviderGoogleUserConnectOut(val *ProviderGoogleUserConnectOut) *NullableProviderGoogleUserConnectOut {
return &NullableProviderGoogleUserConnectOut{value: val, isSet: true}
}
func (v NullableProviderGoogleUserConnectOut) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProviderGoogleUserConnectOut) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}