Files
sdk/model_provider_github_pages_disabled_out.go

193 lines
5.6 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 ProviderGithubPagesDisabledOut type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProviderGithubPagesDisabledOut{}
// ProviderGithubPagesDisabledOut struct for ProviderGithubPagesDisabledOut
type ProviderGithubPagesDisabledOut struct {
// Disabled is always true — a failure is an HTTP error, never this shape.
Disabled *bool `json:"disabled,omitempty"`
// Repo is the repository whose site was deleted.
Repo *string `json:"repo,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ProviderGithubPagesDisabledOut ProviderGithubPagesDisabledOut
// NewProviderGithubPagesDisabledOut instantiates a new ProviderGithubPagesDisabledOut 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 NewProviderGithubPagesDisabledOut() *ProviderGithubPagesDisabledOut {
this := ProviderGithubPagesDisabledOut{}
return &this
}
// NewProviderGithubPagesDisabledOutWithDefaults instantiates a new ProviderGithubPagesDisabledOut 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 NewProviderGithubPagesDisabledOutWithDefaults() *ProviderGithubPagesDisabledOut {
this := ProviderGithubPagesDisabledOut{}
return &this
}
// GetDisabled returns the Disabled field value if set, zero value otherwise.
func (o *ProviderGithubPagesDisabledOut) GetDisabled() bool {
if o == nil || IsNil(o.Disabled) {
var ret bool
return ret
}
return *o.Disabled
}
// GetDisabledOk returns a tuple with the Disabled field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProviderGithubPagesDisabledOut) GetDisabledOk() (*bool, bool) {
if o == nil || IsNil(o.Disabled) {
return nil, false
}
return o.Disabled, true
}
// HasDisabled returns a boolean if a field has been set.
func (o *ProviderGithubPagesDisabledOut) HasDisabled() bool {
if o != nil && !IsNil(o.Disabled) {
return true
}
return false
}
// SetDisabled gets a reference to the given bool and assigns it to the Disabled field.
func (o *ProviderGithubPagesDisabledOut) SetDisabled(v bool) {
o.Disabled = &v
}
// GetRepo returns the Repo field value if set, zero value otherwise.
func (o *ProviderGithubPagesDisabledOut) GetRepo() string {
if o == nil || IsNil(o.Repo) {
var ret string
return ret
}
return *o.Repo
}
// GetRepoOk returns a tuple with the Repo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProviderGithubPagesDisabledOut) GetRepoOk() (*string, bool) {
if o == nil || IsNil(o.Repo) {
return nil, false
}
return o.Repo, true
}
// HasRepo returns a boolean if a field has been set.
func (o *ProviderGithubPagesDisabledOut) HasRepo() bool {
if o != nil && !IsNil(o.Repo) {
return true
}
return false
}
// SetRepo gets a reference to the given string and assigns it to the Repo field.
func (o *ProviderGithubPagesDisabledOut) SetRepo(v string) {
o.Repo = &v
}
func (o ProviderGithubPagesDisabledOut) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ProviderGithubPagesDisabledOut) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Disabled) {
toSerialize["disabled"] = o.Disabled
}
if !IsNil(o.Repo) {
toSerialize["repo"] = o.Repo
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ProviderGithubPagesDisabledOut) UnmarshalJSON(data []byte) (err error) {
varProviderGithubPagesDisabledOut := _ProviderGithubPagesDisabledOut{}
err = json.Unmarshal(data, &varProviderGithubPagesDisabledOut)
if err != nil {
return err
}
*o = ProviderGithubPagesDisabledOut(varProviderGithubPagesDisabledOut)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "disabled")
delete(additionalProperties, "repo")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableProviderGithubPagesDisabledOut struct {
value *ProviderGithubPagesDisabledOut
isSet bool
}
func (v NullableProviderGithubPagesDisabledOut) Get() *ProviderGithubPagesDisabledOut {
return v.value
}
func (v *NullableProviderGithubPagesDisabledOut) Set(val *ProviderGithubPagesDisabledOut) {
v.value = val
v.isSet = true
}
func (v NullableProviderGithubPagesDisabledOut) IsSet() bool {
return v.isSet
}
func (v *NullableProviderGithubPagesDisabledOut) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProviderGithubPagesDisabledOut(val *ProviderGithubPagesDisabledOut) *NullableProviderGithubPagesDisabledOut {
return &NullableProviderGithubPagesDisabledOut{value: val, isSet: true}
}
func (v NullableProviderGithubPagesDisabledOut) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProviderGithubPagesDisabledOut) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}