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