Files
sdk/model_provider_github_pages_build_out.go

231 lines
6.4 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 ProviderGithubPagesBuildOut type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProviderGithubPagesBuildOut{}
// ProviderGithubPagesBuildOut struct for ProviderGithubPagesBuildOut
type ProviderGithubPagesBuildOut struct {
// Repo is the repository the build was queued for.
Repo *string `json:"repo,omitempty"`
// Status is GitHub's build state at the moment it was queued (\"queued\").
Status *string `json:"status,omitempty"`
// URL is GitHub's API URL for the build, for polling it there.
Url *string `json:"url,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ProviderGithubPagesBuildOut ProviderGithubPagesBuildOut
// NewProviderGithubPagesBuildOut instantiates a new ProviderGithubPagesBuildOut 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 NewProviderGithubPagesBuildOut() *ProviderGithubPagesBuildOut {
this := ProviderGithubPagesBuildOut{}
return &this
}
// NewProviderGithubPagesBuildOutWithDefaults instantiates a new ProviderGithubPagesBuildOut 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 NewProviderGithubPagesBuildOutWithDefaults() *ProviderGithubPagesBuildOut {
this := ProviderGithubPagesBuildOut{}
return &this
}
// GetRepo returns the Repo field value if set, zero value otherwise.
func (o *ProviderGithubPagesBuildOut) 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 *ProviderGithubPagesBuildOut) 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 *ProviderGithubPagesBuildOut) 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 *ProviderGithubPagesBuildOut) SetRepo(v string) {
o.Repo = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *ProviderGithubPagesBuildOut) 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 *ProviderGithubPagesBuildOut) 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 *ProviderGithubPagesBuildOut) 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 *ProviderGithubPagesBuildOut) SetStatus(v string) {
o.Status = &v
}
// GetUrl returns the Url field value if set, zero value otherwise.
func (o *ProviderGithubPagesBuildOut) 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 *ProviderGithubPagesBuildOut) 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 *ProviderGithubPagesBuildOut) 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 *ProviderGithubPagesBuildOut) SetUrl(v string) {
o.Url = &v
}
func (o ProviderGithubPagesBuildOut) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ProviderGithubPagesBuildOut) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Repo) {
toSerialize["repo"] = o.Repo
}
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 *ProviderGithubPagesBuildOut) UnmarshalJSON(data []byte) (err error) {
varProviderGithubPagesBuildOut := _ProviderGithubPagesBuildOut{}
err = json.Unmarshal(data, &varProviderGithubPagesBuildOut)
if err != nil {
return err
}
*o = ProviderGithubPagesBuildOut(varProviderGithubPagesBuildOut)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "repo")
delete(additionalProperties, "status")
delete(additionalProperties, "url")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableProviderGithubPagesBuildOut struct {
value *ProviderGithubPagesBuildOut
isSet bool
}
func (v NullableProviderGithubPagesBuildOut) Get() *ProviderGithubPagesBuildOut {
return v.value
}
func (v *NullableProviderGithubPagesBuildOut) Set(val *ProviderGithubPagesBuildOut) {
v.value = val
v.isSet = true
}
func (v NullableProviderGithubPagesBuildOut) IsSet() bool {
return v.isSet
}
func (v *NullableProviderGithubPagesBuildOut) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProviderGithubPagesBuildOut(val *ProviderGithubPagesBuildOut) *NullableProviderGithubPagesBuildOut {
return &NullableProviderGithubPagesBuildOut{value: val, isSet: true}
}
func (v NullableProviderGithubPagesBuildOut) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProviderGithubPagesBuildOut) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}