mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
421 lines
12 KiB
Go
421 lines
12 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 ProviderGithubPagesView type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ProviderGithubPagesView{}
|
|
|
|
// ProviderGithubPagesView struct for ProviderGithubPagesView
|
|
type ProviderGithubPagesView struct {
|
|
// BuildType is the builder in use: \"legacy\" (branch source) or \"workflow\".
|
|
BuildType *string `json:"buildType,omitempty"`
|
|
// CNAME is the custom domain, absent when none is set.
|
|
Cname *string `json:"cname,omitempty"`
|
|
// Custom404 is whether the repo ships its own 404 page.
|
|
Custom404 *bool `json:"custom404,omitempty"`
|
|
// HTTPSEnforced is GitHub's enforce-HTTPS bit.
|
|
HttpsEnforced *bool `json:"httpsEnforced,omitempty"`
|
|
// Repo is the repository the site belongs to.
|
|
Repo *string `json:"repo,omitempty"`
|
|
// Source is the branch + path the site builds from. Absent under \"workflow\".
|
|
Source *ProviderGithubPagesSource `json:"source,omitempty"`
|
|
// Status is GitHub's build state: \"built\", \"building\" or \"errored\". Absent before the first build.
|
|
Status *string `json:"status,omitempty"`
|
|
// URL is the live site (GitHub's html_url).
|
|
Url *string `json:"url,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ProviderGithubPagesView ProviderGithubPagesView
|
|
|
|
// NewProviderGithubPagesView instantiates a new ProviderGithubPagesView 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 NewProviderGithubPagesView() *ProviderGithubPagesView {
|
|
this := ProviderGithubPagesView{}
|
|
return &this
|
|
}
|
|
|
|
// NewProviderGithubPagesViewWithDefaults instantiates a new ProviderGithubPagesView 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 NewProviderGithubPagesViewWithDefaults() *ProviderGithubPagesView {
|
|
this := ProviderGithubPagesView{}
|
|
return &this
|
|
}
|
|
|
|
// GetBuildType returns the BuildType field value if set, zero value otherwise.
|
|
func (o *ProviderGithubPagesView) GetBuildType() string {
|
|
if o == nil || IsNil(o.BuildType) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.BuildType
|
|
}
|
|
|
|
// GetBuildTypeOk returns a tuple with the BuildType field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubPagesView) GetBuildTypeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.BuildType) {
|
|
return nil, false
|
|
}
|
|
return o.BuildType, true
|
|
}
|
|
|
|
// HasBuildType returns a boolean if a field has been set.
|
|
func (o *ProviderGithubPagesView) HasBuildType() bool {
|
|
if o != nil && !IsNil(o.BuildType) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBuildType gets a reference to the given string and assigns it to the BuildType field.
|
|
func (o *ProviderGithubPagesView) SetBuildType(v string) {
|
|
o.BuildType = &v
|
|
}
|
|
|
|
// GetCname returns the Cname field value if set, zero value otherwise.
|
|
func (o *ProviderGithubPagesView) GetCname() string {
|
|
if o == nil || IsNil(o.Cname) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Cname
|
|
}
|
|
|
|
// GetCnameOk returns a tuple with the Cname field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubPagesView) GetCnameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Cname) {
|
|
return nil, false
|
|
}
|
|
return o.Cname, true
|
|
}
|
|
|
|
// HasCname returns a boolean if a field has been set.
|
|
func (o *ProviderGithubPagesView) HasCname() bool {
|
|
if o != nil && !IsNil(o.Cname) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCname gets a reference to the given string and assigns it to the Cname field.
|
|
func (o *ProviderGithubPagesView) SetCname(v string) {
|
|
o.Cname = &v
|
|
}
|
|
|
|
// GetCustom404 returns the Custom404 field value if set, zero value otherwise.
|
|
func (o *ProviderGithubPagesView) GetCustom404() bool {
|
|
if o == nil || IsNil(o.Custom404) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Custom404
|
|
}
|
|
|
|
// GetCustom404Ok returns a tuple with the Custom404 field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubPagesView) GetCustom404Ok() (*bool, bool) {
|
|
if o == nil || IsNil(o.Custom404) {
|
|
return nil, false
|
|
}
|
|
return o.Custom404, true
|
|
}
|
|
|
|
// HasCustom404 returns a boolean if a field has been set.
|
|
func (o *ProviderGithubPagesView) HasCustom404() bool {
|
|
if o != nil && !IsNil(o.Custom404) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCustom404 gets a reference to the given bool and assigns it to the Custom404 field.
|
|
func (o *ProviderGithubPagesView) SetCustom404(v bool) {
|
|
o.Custom404 = &v
|
|
}
|
|
|
|
// GetHttpsEnforced returns the HttpsEnforced field value if set, zero value otherwise.
|
|
func (o *ProviderGithubPagesView) GetHttpsEnforced() bool {
|
|
if o == nil || IsNil(o.HttpsEnforced) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.HttpsEnforced
|
|
}
|
|
|
|
// GetHttpsEnforcedOk returns a tuple with the HttpsEnforced field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubPagesView) GetHttpsEnforcedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.HttpsEnforced) {
|
|
return nil, false
|
|
}
|
|
return o.HttpsEnforced, true
|
|
}
|
|
|
|
// HasHttpsEnforced returns a boolean if a field has been set.
|
|
func (o *ProviderGithubPagesView) HasHttpsEnforced() bool {
|
|
if o != nil && !IsNil(o.HttpsEnforced) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetHttpsEnforced gets a reference to the given bool and assigns it to the HttpsEnforced field.
|
|
func (o *ProviderGithubPagesView) SetHttpsEnforced(v bool) {
|
|
o.HttpsEnforced = &v
|
|
}
|
|
|
|
// GetRepo returns the Repo field value if set, zero value otherwise.
|
|
func (o *ProviderGithubPagesView) 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 *ProviderGithubPagesView) 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 *ProviderGithubPagesView) 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 *ProviderGithubPagesView) SetRepo(v string) {
|
|
o.Repo = &v
|
|
}
|
|
|
|
// GetSource returns the Source field value if set, zero value otherwise.
|
|
func (o *ProviderGithubPagesView) GetSource() ProviderGithubPagesSource {
|
|
if o == nil || IsNil(o.Source) {
|
|
var ret ProviderGithubPagesSource
|
|
return ret
|
|
}
|
|
return *o.Source
|
|
}
|
|
|
|
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubPagesView) GetSourceOk() (*ProviderGithubPagesSource, bool) {
|
|
if o == nil || IsNil(o.Source) {
|
|
return nil, false
|
|
}
|
|
return o.Source, true
|
|
}
|
|
|
|
// HasSource returns a boolean if a field has been set.
|
|
func (o *ProviderGithubPagesView) HasSource() bool {
|
|
if o != nil && !IsNil(o.Source) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSource gets a reference to the given ProviderGithubPagesSource and assigns it to the Source field.
|
|
func (o *ProviderGithubPagesView) SetSource(v ProviderGithubPagesSource) {
|
|
o.Source = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *ProviderGithubPagesView) GetStatus() string {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubPagesView) GetStatusOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return nil, false
|
|
}
|
|
return o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *ProviderGithubPagesView) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
|
func (o *ProviderGithubPagesView) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetUrl returns the Url field value if set, zero value otherwise.
|
|
func (o *ProviderGithubPagesView) GetUrl() string {
|
|
if o == nil || IsNil(o.Url) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Url
|
|
}
|
|
|
|
// GetUrlOk returns a tuple with the Url field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubPagesView) GetUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Url) {
|
|
return nil, false
|
|
}
|
|
return o.Url, true
|
|
}
|
|
|
|
// HasUrl returns a boolean if a field has been set.
|
|
func (o *ProviderGithubPagesView) HasUrl() bool {
|
|
if o != nil && !IsNil(o.Url) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUrl gets a reference to the given string and assigns it to the Url field.
|
|
func (o *ProviderGithubPagesView) SetUrl(v string) {
|
|
o.Url = &v
|
|
}
|
|
|
|
func (o ProviderGithubPagesView) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ProviderGithubPagesView) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.BuildType) {
|
|
toSerialize["buildType"] = o.BuildType
|
|
}
|
|
if !IsNil(o.Cname) {
|
|
toSerialize["cname"] = o.Cname
|
|
}
|
|
if !IsNil(o.Custom404) {
|
|
toSerialize["custom404"] = o.Custom404
|
|
}
|
|
if !IsNil(o.HttpsEnforced) {
|
|
toSerialize["httpsEnforced"] = o.HttpsEnforced
|
|
}
|
|
if !IsNil(o.Repo) {
|
|
toSerialize["repo"] = o.Repo
|
|
}
|
|
if !IsNil(o.Source) {
|
|
toSerialize["source"] = o.Source
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
if !IsNil(o.Url) {
|
|
toSerialize["url"] = o.Url
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ProviderGithubPagesView) UnmarshalJSON(data []byte) (err error) {
|
|
varProviderGithubPagesView := _ProviderGithubPagesView{}
|
|
|
|
err = json.Unmarshal(data, &varProviderGithubPagesView)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ProviderGithubPagesView(varProviderGithubPagesView)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "buildType")
|
|
delete(additionalProperties, "cname")
|
|
delete(additionalProperties, "custom404")
|
|
delete(additionalProperties, "httpsEnforced")
|
|
delete(additionalProperties, "repo")
|
|
delete(additionalProperties, "source")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "url")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableProviderGithubPagesView struct {
|
|
value *ProviderGithubPagesView
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableProviderGithubPagesView) Get() *ProviderGithubPagesView {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableProviderGithubPagesView) Set(val *ProviderGithubPagesView) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableProviderGithubPagesView) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableProviderGithubPagesView) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableProviderGithubPagesView(val *ProviderGithubPagesView) *NullableProviderGithubPagesView {
|
|
return &NullableProviderGithubPagesView{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableProviderGithubPagesView) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableProviderGithubPagesView) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|