Files
sdk/model_git_gc_out.go

231 lines
5.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 GitGcOut type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GitGcOut{}
// GitGcOut struct for GitGcOut
type GitGcOut struct {
// Maintained is always true; the call fails rather than reporting false.
Maintained *bool `json:"maintained,omitempty"`
// Repo is the repo that was repacked.
Repo *string `json:"repo,omitempty"`
// SizeBytes is the size measured AFTER the repack — usually smaller, since repacking drops the packs it supersedes.
SizeBytes *int64 `json:"sizeBytes,omitempty"`
AdditionalProperties map[string]interface{}
}
type _GitGcOut GitGcOut
// NewGitGcOut instantiates a new GitGcOut 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 NewGitGcOut() *GitGcOut {
this := GitGcOut{}
return &this
}
// NewGitGcOutWithDefaults instantiates a new GitGcOut 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 NewGitGcOutWithDefaults() *GitGcOut {
this := GitGcOut{}
return &this
}
// GetMaintained returns the Maintained field value if set, zero value otherwise.
func (o *GitGcOut) GetMaintained() bool {
if o == nil || IsNil(o.Maintained) {
var ret bool
return ret
}
return *o.Maintained
}
// GetMaintainedOk returns a tuple with the Maintained field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GitGcOut) GetMaintainedOk() (*bool, bool) {
if o == nil || IsNil(o.Maintained) {
return nil, false
}
return o.Maintained, true
}
// HasMaintained returns a boolean if a field has been set.
func (o *GitGcOut) HasMaintained() bool {
if o != nil && !IsNil(o.Maintained) {
return true
}
return false
}
// SetMaintained gets a reference to the given bool and assigns it to the Maintained field.
func (o *GitGcOut) SetMaintained(v bool) {
o.Maintained = &v
}
// GetRepo returns the Repo field value if set, zero value otherwise.
func (o *GitGcOut) 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 *GitGcOut) 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 *GitGcOut) 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 *GitGcOut) SetRepo(v string) {
o.Repo = &v
}
// GetSizeBytes returns the SizeBytes field value if set, zero value otherwise.
func (o *GitGcOut) GetSizeBytes() int64 {
if o == nil || IsNil(o.SizeBytes) {
var ret int64
return ret
}
return *o.SizeBytes
}
// GetSizeBytesOk returns a tuple with the SizeBytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GitGcOut) GetSizeBytesOk() (*int64, bool) {
if o == nil || IsNil(o.SizeBytes) {
return nil, false
}
return o.SizeBytes, true
}
// HasSizeBytes returns a boolean if a field has been set.
func (o *GitGcOut) HasSizeBytes() bool {
if o != nil && !IsNil(o.SizeBytes) {
return true
}
return false
}
// SetSizeBytes gets a reference to the given int64 and assigns it to the SizeBytes field.
func (o *GitGcOut) SetSizeBytes(v int64) {
o.SizeBytes = &v
}
func (o GitGcOut) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GitGcOut) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Maintained) {
toSerialize["maintained"] = o.Maintained
}
if !IsNil(o.Repo) {
toSerialize["repo"] = o.Repo
}
if !IsNil(o.SizeBytes) {
toSerialize["sizeBytes"] = o.SizeBytes
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *GitGcOut) UnmarshalJSON(data []byte) (err error) {
varGitGcOut := _GitGcOut{}
err = json.Unmarshal(data, &varGitGcOut)
if err != nil {
return err
}
*o = GitGcOut(varGitGcOut)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "maintained")
delete(additionalProperties, "repo")
delete(additionalProperties, "sizeBytes")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableGitGcOut struct {
value *GitGcOut
isSet bool
}
func (v NullableGitGcOut) Get() *GitGcOut {
return v.value
}
func (v *NullableGitGcOut) Set(val *GitGcOut) {
v.value = val
v.isSet = true
}
func (v NullableGitGcOut) IsSet() bool {
return v.isSet
}
func (v *NullableGitGcOut) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGitGcOut(val *GitGcOut) *NullableGitGcOut {
return &NullableGitGcOut{value: val, isSet: true}
}
func (v NullableGitGcOut) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGitGcOut) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}