mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
345 lines
9.9 KiB
Go
345 lines
9.9 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 ProviderGithubPagesUpdateReq type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ProviderGithubPagesUpdateReq{}
|
|
|
|
// ProviderGithubPagesUpdateReq struct for ProviderGithubPagesUpdateReq
|
|
type ProviderGithubPagesUpdateReq struct {
|
|
// Branch switches the legacy source branch. Empty leaves the source alone.
|
|
Branch *string `json:"branch,omitempty"`
|
|
// BuildType switches the builder: \"legacy\" or \"workflow\". Empty leaves it.
|
|
BuildType *string `json:"buildType,omitempty"`
|
|
// CNAME is the custom domain. Omit to leave it alone, \"\" to clear it, or a valid FQDN to set it.
|
|
Cname *string `json:"cname,omitempty"`
|
|
// HTTPSEnforced toggles GitHub's enforce-HTTPS bit. Omit to leave it alone.
|
|
HttpsEnforced *bool `json:"httpsEnforced,omitempty"`
|
|
// Path is the source directory to pair with Branch: \"/\" (the default) or \"/docs\". Read only when Branch is given.
|
|
Path *string `json:"path,omitempty"`
|
|
// Repo is the repository, from the :repo path segment.
|
|
Repo *string `json:"repo,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ProviderGithubPagesUpdateReq ProviderGithubPagesUpdateReq
|
|
|
|
// NewProviderGithubPagesUpdateReq instantiates a new ProviderGithubPagesUpdateReq 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 NewProviderGithubPagesUpdateReq() *ProviderGithubPagesUpdateReq {
|
|
this := ProviderGithubPagesUpdateReq{}
|
|
return &this
|
|
}
|
|
|
|
// NewProviderGithubPagesUpdateReqWithDefaults instantiates a new ProviderGithubPagesUpdateReq 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 NewProviderGithubPagesUpdateReqWithDefaults() *ProviderGithubPagesUpdateReq {
|
|
this := ProviderGithubPagesUpdateReq{}
|
|
return &this
|
|
}
|
|
|
|
// GetBranch returns the Branch field value if set, zero value otherwise.
|
|
func (o *ProviderGithubPagesUpdateReq) GetBranch() string {
|
|
if o == nil || IsNil(o.Branch) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Branch
|
|
}
|
|
|
|
// GetBranchOk returns a tuple with the Branch field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubPagesUpdateReq) GetBranchOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Branch) {
|
|
return nil, false
|
|
}
|
|
return o.Branch, true
|
|
}
|
|
|
|
// HasBranch returns a boolean if a field has been set.
|
|
func (o *ProviderGithubPagesUpdateReq) HasBranch() bool {
|
|
if o != nil && !IsNil(o.Branch) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBranch gets a reference to the given string and assigns it to the Branch field.
|
|
func (o *ProviderGithubPagesUpdateReq) SetBranch(v string) {
|
|
o.Branch = &v
|
|
}
|
|
|
|
// GetBuildType returns the BuildType field value if set, zero value otherwise.
|
|
func (o *ProviderGithubPagesUpdateReq) 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 *ProviderGithubPagesUpdateReq) 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 *ProviderGithubPagesUpdateReq) 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 *ProviderGithubPagesUpdateReq) SetBuildType(v string) {
|
|
o.BuildType = &v
|
|
}
|
|
|
|
// GetCname returns the Cname field value if set, zero value otherwise.
|
|
func (o *ProviderGithubPagesUpdateReq) 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 *ProviderGithubPagesUpdateReq) 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 *ProviderGithubPagesUpdateReq) 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 *ProviderGithubPagesUpdateReq) SetCname(v string) {
|
|
o.Cname = &v
|
|
}
|
|
|
|
// GetHttpsEnforced returns the HttpsEnforced field value if set, zero value otherwise.
|
|
func (o *ProviderGithubPagesUpdateReq) 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 *ProviderGithubPagesUpdateReq) 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 *ProviderGithubPagesUpdateReq) 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 *ProviderGithubPagesUpdateReq) SetHttpsEnforced(v bool) {
|
|
o.HttpsEnforced = &v
|
|
}
|
|
|
|
// GetPath returns the Path field value if set, zero value otherwise.
|
|
func (o *ProviderGithubPagesUpdateReq) GetPath() string {
|
|
if o == nil || IsNil(o.Path) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Path
|
|
}
|
|
|
|
// GetPathOk returns a tuple with the Path field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubPagesUpdateReq) GetPathOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Path) {
|
|
return nil, false
|
|
}
|
|
return o.Path, true
|
|
}
|
|
|
|
// HasPath returns a boolean if a field has been set.
|
|
func (o *ProviderGithubPagesUpdateReq) HasPath() bool {
|
|
if o != nil && !IsNil(o.Path) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPath gets a reference to the given string and assigns it to the Path field.
|
|
func (o *ProviderGithubPagesUpdateReq) SetPath(v string) {
|
|
o.Path = &v
|
|
}
|
|
|
|
// GetRepo returns the Repo field value if set, zero value otherwise.
|
|
func (o *ProviderGithubPagesUpdateReq) 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 *ProviderGithubPagesUpdateReq) 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 *ProviderGithubPagesUpdateReq) 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 *ProviderGithubPagesUpdateReq) SetRepo(v string) {
|
|
o.Repo = &v
|
|
}
|
|
|
|
func (o ProviderGithubPagesUpdateReq) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ProviderGithubPagesUpdateReq) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Branch) {
|
|
toSerialize["branch"] = o.Branch
|
|
}
|
|
if !IsNil(o.BuildType) {
|
|
toSerialize["buildType"] = o.BuildType
|
|
}
|
|
if !IsNil(o.Cname) {
|
|
toSerialize["cname"] = o.Cname
|
|
}
|
|
if !IsNil(o.HttpsEnforced) {
|
|
toSerialize["httpsEnforced"] = o.HttpsEnforced
|
|
}
|
|
if !IsNil(o.Path) {
|
|
toSerialize["path"] = o.Path
|
|
}
|
|
if !IsNil(o.Repo) {
|
|
toSerialize["repo"] = o.Repo
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ProviderGithubPagesUpdateReq) UnmarshalJSON(data []byte) (err error) {
|
|
varProviderGithubPagesUpdateReq := _ProviderGithubPagesUpdateReq{}
|
|
|
|
err = json.Unmarshal(data, &varProviderGithubPagesUpdateReq)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ProviderGithubPagesUpdateReq(varProviderGithubPagesUpdateReq)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "branch")
|
|
delete(additionalProperties, "buildType")
|
|
delete(additionalProperties, "cname")
|
|
delete(additionalProperties, "httpsEnforced")
|
|
delete(additionalProperties, "path")
|
|
delete(additionalProperties, "repo")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableProviderGithubPagesUpdateReq struct {
|
|
value *ProviderGithubPagesUpdateReq
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableProviderGithubPagesUpdateReq) Get() *ProviderGithubPagesUpdateReq {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableProviderGithubPagesUpdateReq) Set(val *ProviderGithubPagesUpdateReq) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableProviderGithubPagesUpdateReq) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableProviderGithubPagesUpdateReq) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableProviderGithubPagesUpdateReq(val *ProviderGithubPagesUpdateReq) *NullableProviderGithubPagesUpdateReq {
|
|
return &NullableProviderGithubPagesUpdateReq{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableProviderGithubPagesUpdateReq) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableProviderGithubPagesUpdateReq) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|