Files
sdk/model_provider_github_user_complete_in.go

155 lines
4.5 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 ProviderGithubUserCompleteIn type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProviderGithubUserCompleteIn{}
// ProviderGithubUserCompleteIn struct for ProviderGithubUserCompleteIn
type ProviderGithubUserCompleteIn struct {
// Grant is the id the callback handed the console in its redirect. It is single-use, lives ten minutes, and is readable only by the person who started the flow.
Grant *string `json:"grant,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ProviderGithubUserCompleteIn ProviderGithubUserCompleteIn
// NewProviderGithubUserCompleteIn instantiates a new ProviderGithubUserCompleteIn 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 NewProviderGithubUserCompleteIn() *ProviderGithubUserCompleteIn {
this := ProviderGithubUserCompleteIn{}
return &this
}
// NewProviderGithubUserCompleteInWithDefaults instantiates a new ProviderGithubUserCompleteIn 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 NewProviderGithubUserCompleteInWithDefaults() *ProviderGithubUserCompleteIn {
this := ProviderGithubUserCompleteIn{}
return &this
}
// GetGrant returns the Grant field value if set, zero value otherwise.
func (o *ProviderGithubUserCompleteIn) GetGrant() string {
if o == nil || IsNil(o.Grant) {
var ret string
return ret
}
return *o.Grant
}
// GetGrantOk returns a tuple with the Grant field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProviderGithubUserCompleteIn) GetGrantOk() (*string, bool) {
if o == nil || IsNil(o.Grant) {
return nil, false
}
return o.Grant, true
}
// HasGrant returns a boolean if a field has been set.
func (o *ProviderGithubUserCompleteIn) HasGrant() bool {
if o != nil && !IsNil(o.Grant) {
return true
}
return false
}
// SetGrant gets a reference to the given string and assigns it to the Grant field.
func (o *ProviderGithubUserCompleteIn) SetGrant(v string) {
o.Grant = &v
}
func (o ProviderGithubUserCompleteIn) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ProviderGithubUserCompleteIn) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Grant) {
toSerialize["grant"] = o.Grant
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ProviderGithubUserCompleteIn) UnmarshalJSON(data []byte) (err error) {
varProviderGithubUserCompleteIn := _ProviderGithubUserCompleteIn{}
err = json.Unmarshal(data, &varProviderGithubUserCompleteIn)
if err != nil {
return err
}
*o = ProviderGithubUserCompleteIn(varProviderGithubUserCompleteIn)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "grant")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableProviderGithubUserCompleteIn struct {
value *ProviderGithubUserCompleteIn
isSet bool
}
func (v NullableProviderGithubUserCompleteIn) Get() *ProviderGithubUserCompleteIn {
return v.value
}
func (v *NullableProviderGithubUserCompleteIn) Set(val *ProviderGithubUserCompleteIn) {
v.value = val
v.isSet = true
}
func (v NullableProviderGithubUserCompleteIn) IsSet() bool {
return v.isSet
}
func (v *NullableProviderGithubUserCompleteIn) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProviderGithubUserCompleteIn(val *ProviderGithubUserCompleteIn) *NullableProviderGithubUserCompleteIn {
return &NullableProviderGithubUserCompleteIn{value: val, isSet: true}
}
func (v NullableProviderGithubUserCompleteIn) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProviderGithubUserCompleteIn) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}