mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
6.0 KiB
Go
193 lines
6.0 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 ProviderGithubUserDisconnectOut type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ProviderGithubUserDisconnectOut{}
|
|
|
|
// ProviderGithubUserDisconnectOut struct for ProviderGithubUserDisconnectOut
|
|
type ProviderGithubUserDisconnectOut struct {
|
|
// Disconnected is always true: the sealed token and the connection are gone from this deployment. A custody failure is an HTTP error instead.
|
|
Disconnected *bool `json:"disconnected,omitempty"`
|
|
// Revoked is whether GitHub confirmed the token is dead. False means GitHub could not be told — the token lives until it expires or is revoked from the person's GitHub settings — or there was no token to revoke.
|
|
Revoked *bool `json:"revoked,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ProviderGithubUserDisconnectOut ProviderGithubUserDisconnectOut
|
|
|
|
// NewProviderGithubUserDisconnectOut instantiates a new ProviderGithubUserDisconnectOut 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 NewProviderGithubUserDisconnectOut() *ProviderGithubUserDisconnectOut {
|
|
this := ProviderGithubUserDisconnectOut{}
|
|
return &this
|
|
}
|
|
|
|
// NewProviderGithubUserDisconnectOutWithDefaults instantiates a new ProviderGithubUserDisconnectOut 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 NewProviderGithubUserDisconnectOutWithDefaults() *ProviderGithubUserDisconnectOut {
|
|
this := ProviderGithubUserDisconnectOut{}
|
|
return &this
|
|
}
|
|
|
|
// GetDisconnected returns the Disconnected field value if set, zero value otherwise.
|
|
func (o *ProviderGithubUserDisconnectOut) GetDisconnected() bool {
|
|
if o == nil || IsNil(o.Disconnected) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Disconnected
|
|
}
|
|
|
|
// GetDisconnectedOk returns a tuple with the Disconnected field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubUserDisconnectOut) GetDisconnectedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Disconnected) {
|
|
return nil, false
|
|
}
|
|
return o.Disconnected, true
|
|
}
|
|
|
|
// HasDisconnected returns a boolean if a field has been set.
|
|
func (o *ProviderGithubUserDisconnectOut) HasDisconnected() bool {
|
|
if o != nil && !IsNil(o.Disconnected) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDisconnected gets a reference to the given bool and assigns it to the Disconnected field.
|
|
func (o *ProviderGithubUserDisconnectOut) SetDisconnected(v bool) {
|
|
o.Disconnected = &v
|
|
}
|
|
|
|
// GetRevoked returns the Revoked field value if set, zero value otherwise.
|
|
func (o *ProviderGithubUserDisconnectOut) GetRevoked() bool {
|
|
if o == nil || IsNil(o.Revoked) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Revoked
|
|
}
|
|
|
|
// GetRevokedOk returns a tuple with the Revoked field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubUserDisconnectOut) GetRevokedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Revoked) {
|
|
return nil, false
|
|
}
|
|
return o.Revoked, true
|
|
}
|
|
|
|
// HasRevoked returns a boolean if a field has been set.
|
|
func (o *ProviderGithubUserDisconnectOut) HasRevoked() bool {
|
|
if o != nil && !IsNil(o.Revoked) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRevoked gets a reference to the given bool and assigns it to the Revoked field.
|
|
func (o *ProviderGithubUserDisconnectOut) SetRevoked(v bool) {
|
|
o.Revoked = &v
|
|
}
|
|
|
|
func (o ProviderGithubUserDisconnectOut) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ProviderGithubUserDisconnectOut) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Disconnected) {
|
|
toSerialize["disconnected"] = o.Disconnected
|
|
}
|
|
if !IsNil(o.Revoked) {
|
|
toSerialize["revoked"] = o.Revoked
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ProviderGithubUserDisconnectOut) UnmarshalJSON(data []byte) (err error) {
|
|
varProviderGithubUserDisconnectOut := _ProviderGithubUserDisconnectOut{}
|
|
|
|
err = json.Unmarshal(data, &varProviderGithubUserDisconnectOut)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ProviderGithubUserDisconnectOut(varProviderGithubUserDisconnectOut)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "disconnected")
|
|
delete(additionalProperties, "revoked")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableProviderGithubUserDisconnectOut struct {
|
|
value *ProviderGithubUserDisconnectOut
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableProviderGithubUserDisconnectOut) Get() *ProviderGithubUserDisconnectOut {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableProviderGithubUserDisconnectOut) Set(val *ProviderGithubUserDisconnectOut) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableProviderGithubUserDisconnectOut) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableProviderGithubUserDisconnectOut) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableProviderGithubUserDisconnectOut(val *ProviderGithubUserDisconnectOut) *NullableProviderGithubUserDisconnectOut {
|
|
return &NullableProviderGithubUserDisconnectOut{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableProviderGithubUserDisconnectOut) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableProviderGithubUserDisconnectOut) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|