mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
7.7 KiB
Go
269 lines
7.7 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 ProviderGithubPagesEnableReq type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ProviderGithubPagesEnableReq{}
|
|
|
|
// ProviderGithubPagesEnableReq struct for ProviderGithubPagesEnableReq
|
|
type ProviderGithubPagesEnableReq struct {
|
|
// Branch is the legacy source branch; empty defaults to the repo's own default branch. Ignored when buildType is \"workflow\".
|
|
Branch *string `json:"branch,omitempty"`
|
|
// BuildType selects the builder: \"workflow\" builds via GitHub Actions, anything else builds from the branch source above.
|
|
BuildType *string `json:"buildType,omitempty"`
|
|
// Path is the source directory within the branch: \"/\" (the default) or \"/docs\". GitHub allows no others.
|
|
Path *string `json:"path,omitempty"`
|
|
// Repo is the repository, from the :repo path segment.
|
|
Repo *string `json:"repo,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ProviderGithubPagesEnableReq ProviderGithubPagesEnableReq
|
|
|
|
// NewProviderGithubPagesEnableReq instantiates a new ProviderGithubPagesEnableReq 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 NewProviderGithubPagesEnableReq() *ProviderGithubPagesEnableReq {
|
|
this := ProviderGithubPagesEnableReq{}
|
|
return &this
|
|
}
|
|
|
|
// NewProviderGithubPagesEnableReqWithDefaults instantiates a new ProviderGithubPagesEnableReq 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 NewProviderGithubPagesEnableReqWithDefaults() *ProviderGithubPagesEnableReq {
|
|
this := ProviderGithubPagesEnableReq{}
|
|
return &this
|
|
}
|
|
|
|
// GetBranch returns the Branch field value if set, zero value otherwise.
|
|
func (o *ProviderGithubPagesEnableReq) 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 *ProviderGithubPagesEnableReq) 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 *ProviderGithubPagesEnableReq) 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 *ProviderGithubPagesEnableReq) SetBranch(v string) {
|
|
o.Branch = &v
|
|
}
|
|
|
|
// GetBuildType returns the BuildType field value if set, zero value otherwise.
|
|
func (o *ProviderGithubPagesEnableReq) 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 *ProviderGithubPagesEnableReq) 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 *ProviderGithubPagesEnableReq) 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 *ProviderGithubPagesEnableReq) SetBuildType(v string) {
|
|
o.BuildType = &v
|
|
}
|
|
|
|
// GetPath returns the Path field value if set, zero value otherwise.
|
|
func (o *ProviderGithubPagesEnableReq) 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 *ProviderGithubPagesEnableReq) 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 *ProviderGithubPagesEnableReq) 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 *ProviderGithubPagesEnableReq) SetPath(v string) {
|
|
o.Path = &v
|
|
}
|
|
|
|
// GetRepo returns the Repo field value if set, zero value otherwise.
|
|
func (o *ProviderGithubPagesEnableReq) 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 *ProviderGithubPagesEnableReq) 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 *ProviderGithubPagesEnableReq) 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 *ProviderGithubPagesEnableReq) SetRepo(v string) {
|
|
o.Repo = &v
|
|
}
|
|
|
|
func (o ProviderGithubPagesEnableReq) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ProviderGithubPagesEnableReq) 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.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 *ProviderGithubPagesEnableReq) UnmarshalJSON(data []byte) (err error) {
|
|
varProviderGithubPagesEnableReq := _ProviderGithubPagesEnableReq{}
|
|
|
|
err = json.Unmarshal(data, &varProviderGithubPagesEnableReq)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ProviderGithubPagesEnableReq(varProviderGithubPagesEnableReq)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "branch")
|
|
delete(additionalProperties, "buildType")
|
|
delete(additionalProperties, "path")
|
|
delete(additionalProperties, "repo")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableProviderGithubPagesEnableReq struct {
|
|
value *ProviderGithubPagesEnableReq
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableProviderGithubPagesEnableReq) Get() *ProviderGithubPagesEnableReq {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableProviderGithubPagesEnableReq) Set(val *ProviderGithubPagesEnableReq) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableProviderGithubPagesEnableReq) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableProviderGithubPagesEnableReq) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableProviderGithubPagesEnableReq(val *ProviderGithubPagesEnableReq) *NullableProviderGithubPagesEnableReq {
|
|
return &NullableProviderGithubPagesEnableReq{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableProviderGithubPagesEnableReq) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableProviderGithubPagesEnableReq) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|