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 AgentCodingChanges type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AgentCodingChanges{}
|
|
|
|
// AgentCodingChanges struct for AgentCodingChanges
|
|
type AgentCodingChanges struct {
|
|
// Base is the branch the run started from: the one it was given, or the repository's default.
|
|
Base *string `json:"base,omitempty"`
|
|
// Commits are the commits on head that base does not have, newest first.
|
|
Commits []AgentCodingCommit `json:"commits,omitempty"`
|
|
// Files is the net change head makes against its merge base with base, one entry per file.
|
|
Files []AgentCodingFile `json:"files,omitempty"`
|
|
// Head is the run's own branch. Empty for a plan or a setup, which write none.
|
|
Head *string `json:"head,omitempty"`
|
|
// MoreCommits says the branch carries more commits than the newest 250 that Commits lists.
|
|
MoreCommits *bool `json:"moreCommits,omitempty"`
|
|
// MoreFiles says the change is larger than one read answers — past 8 MiB of diff or 3000 files — so Files lists the files before that, and the last of them is marked truncated with the counts of the part read.
|
|
MoreFiles *bool `json:"moreFiles,omitempty"`
|
|
// Pull is the run's pull request, or null while it has none. The forge's own is read whole; one proposed somewhere else — a repository the forge only mirrors from GitHub — is the address and number the run recorded, with its state, title and reviews empty.
|
|
Pull *AgentCodingPull `json:"pull,omitempty"`
|
|
// Repo is the run's repository on the forge, owner/name.
|
|
Repo *string `json:"repo,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AgentCodingChanges AgentCodingChanges
|
|
|
|
// NewAgentCodingChanges instantiates a new AgentCodingChanges 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 NewAgentCodingChanges() *AgentCodingChanges {
|
|
this := AgentCodingChanges{}
|
|
return &this
|
|
}
|
|
|
|
// NewAgentCodingChangesWithDefaults instantiates a new AgentCodingChanges 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 NewAgentCodingChangesWithDefaults() *AgentCodingChanges {
|
|
this := AgentCodingChanges{}
|
|
return &this
|
|
}
|
|
|
|
// GetBase returns the Base field value if set, zero value otherwise.
|
|
func (o *AgentCodingChanges) GetBase() string {
|
|
if o == nil || IsNil(o.Base) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Base
|
|
}
|
|
|
|
// GetBaseOk returns a tuple with the Base field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingChanges) GetBaseOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Base) {
|
|
return nil, false
|
|
}
|
|
return o.Base, true
|
|
}
|
|
|
|
// HasBase returns a boolean if a field has been set.
|
|
func (o *AgentCodingChanges) HasBase() bool {
|
|
if o != nil && !IsNil(o.Base) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBase gets a reference to the given string and assigns it to the Base field.
|
|
func (o *AgentCodingChanges) SetBase(v string) {
|
|
o.Base = &v
|
|
}
|
|
|
|
// GetCommits returns the Commits field value if set, zero value otherwise.
|
|
func (o *AgentCodingChanges) GetCommits() []AgentCodingCommit {
|
|
if o == nil || IsNil(o.Commits) {
|
|
var ret []AgentCodingCommit
|
|
return ret
|
|
}
|
|
return o.Commits
|
|
}
|
|
|
|
// GetCommitsOk returns a tuple with the Commits field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingChanges) GetCommitsOk() ([]AgentCodingCommit, bool) {
|
|
if o == nil || IsNil(o.Commits) {
|
|
return nil, false
|
|
}
|
|
return o.Commits, true
|
|
}
|
|
|
|
// HasCommits returns a boolean if a field has been set.
|
|
func (o *AgentCodingChanges) HasCommits() bool {
|
|
if o != nil && !IsNil(o.Commits) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCommits gets a reference to the given []AgentCodingCommit and assigns it to the Commits field.
|
|
func (o *AgentCodingChanges) SetCommits(v []AgentCodingCommit) {
|
|
o.Commits = v
|
|
}
|
|
|
|
// GetFiles returns the Files field value if set, zero value otherwise.
|
|
func (o *AgentCodingChanges) GetFiles() []AgentCodingFile {
|
|
if o == nil || IsNil(o.Files) {
|
|
var ret []AgentCodingFile
|
|
return ret
|
|
}
|
|
return o.Files
|
|
}
|
|
|
|
// GetFilesOk returns a tuple with the Files field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingChanges) GetFilesOk() ([]AgentCodingFile, bool) {
|
|
if o == nil || IsNil(o.Files) {
|
|
return nil, false
|
|
}
|
|
return o.Files, true
|
|
}
|
|
|
|
// HasFiles returns a boolean if a field has been set.
|
|
func (o *AgentCodingChanges) HasFiles() bool {
|
|
if o != nil && !IsNil(o.Files) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFiles gets a reference to the given []AgentCodingFile and assigns it to the Files field.
|
|
func (o *AgentCodingChanges) SetFiles(v []AgentCodingFile) {
|
|
o.Files = v
|
|
}
|
|
|
|
// GetHead returns the Head field value if set, zero value otherwise.
|
|
func (o *AgentCodingChanges) GetHead() string {
|
|
if o == nil || IsNil(o.Head) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Head
|
|
}
|
|
|
|
// GetHeadOk returns a tuple with the Head field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingChanges) GetHeadOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Head) {
|
|
return nil, false
|
|
}
|
|
return o.Head, true
|
|
}
|
|
|
|
// HasHead returns a boolean if a field has been set.
|
|
func (o *AgentCodingChanges) HasHead() bool {
|
|
if o != nil && !IsNil(o.Head) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetHead gets a reference to the given string and assigns it to the Head field.
|
|
func (o *AgentCodingChanges) SetHead(v string) {
|
|
o.Head = &v
|
|
}
|
|
|
|
// GetMoreCommits returns the MoreCommits field value if set, zero value otherwise.
|
|
func (o *AgentCodingChanges) GetMoreCommits() bool {
|
|
if o == nil || IsNil(o.MoreCommits) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.MoreCommits
|
|
}
|
|
|
|
// GetMoreCommitsOk returns a tuple with the MoreCommits field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingChanges) GetMoreCommitsOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.MoreCommits) {
|
|
return nil, false
|
|
}
|
|
return o.MoreCommits, true
|
|
}
|
|
|
|
// HasMoreCommits returns a boolean if a field has been set.
|
|
func (o *AgentCodingChanges) HasMoreCommits() bool {
|
|
if o != nil && !IsNil(o.MoreCommits) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMoreCommits gets a reference to the given bool and assigns it to the MoreCommits field.
|
|
func (o *AgentCodingChanges) SetMoreCommits(v bool) {
|
|
o.MoreCommits = &v
|
|
}
|
|
|
|
// GetMoreFiles returns the MoreFiles field value if set, zero value otherwise.
|
|
func (o *AgentCodingChanges) GetMoreFiles() bool {
|
|
if o == nil || IsNil(o.MoreFiles) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.MoreFiles
|
|
}
|
|
|
|
// GetMoreFilesOk returns a tuple with the MoreFiles field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingChanges) GetMoreFilesOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.MoreFiles) {
|
|
return nil, false
|
|
}
|
|
return o.MoreFiles, true
|
|
}
|
|
|
|
// HasMoreFiles returns a boolean if a field has been set.
|
|
func (o *AgentCodingChanges) HasMoreFiles() bool {
|
|
if o != nil && !IsNil(o.MoreFiles) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMoreFiles gets a reference to the given bool and assigns it to the MoreFiles field.
|
|
func (o *AgentCodingChanges) SetMoreFiles(v bool) {
|
|
o.MoreFiles = &v
|
|
}
|
|
|
|
// GetPull returns the Pull field value if set, zero value otherwise.
|
|
func (o *AgentCodingChanges) GetPull() AgentCodingPull {
|
|
if o == nil || IsNil(o.Pull) {
|
|
var ret AgentCodingPull
|
|
return ret
|
|
}
|
|
return *o.Pull
|
|
}
|
|
|
|
// GetPullOk returns a tuple with the Pull field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingChanges) GetPullOk() (*AgentCodingPull, bool) {
|
|
if o == nil || IsNil(o.Pull) {
|
|
return nil, false
|
|
}
|
|
return o.Pull, true
|
|
}
|
|
|
|
// HasPull returns a boolean if a field has been set.
|
|
func (o *AgentCodingChanges) HasPull() bool {
|
|
if o != nil && !IsNil(o.Pull) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPull gets a reference to the given AgentCodingPull and assigns it to the Pull field.
|
|
func (o *AgentCodingChanges) SetPull(v AgentCodingPull) {
|
|
o.Pull = &v
|
|
}
|
|
|
|
// GetRepo returns the Repo field value if set, zero value otherwise.
|
|
func (o *AgentCodingChanges) 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 *AgentCodingChanges) 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 *AgentCodingChanges) 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 *AgentCodingChanges) SetRepo(v string) {
|
|
o.Repo = &v
|
|
}
|
|
|
|
func (o AgentCodingChanges) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AgentCodingChanges) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Base) {
|
|
toSerialize["base"] = o.Base
|
|
}
|
|
if !IsNil(o.Commits) {
|
|
toSerialize["commits"] = o.Commits
|
|
}
|
|
if !IsNil(o.Files) {
|
|
toSerialize["files"] = o.Files
|
|
}
|
|
if !IsNil(o.Head) {
|
|
toSerialize["head"] = o.Head
|
|
}
|
|
if !IsNil(o.MoreCommits) {
|
|
toSerialize["moreCommits"] = o.MoreCommits
|
|
}
|
|
if !IsNil(o.MoreFiles) {
|
|
toSerialize["moreFiles"] = o.MoreFiles
|
|
}
|
|
if !IsNil(o.Pull) {
|
|
toSerialize["pull"] = o.Pull
|
|
}
|
|
if !IsNil(o.Repo) {
|
|
toSerialize["repo"] = o.Repo
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AgentCodingChanges) UnmarshalJSON(data []byte) (err error) {
|
|
varAgentCodingChanges := _AgentCodingChanges{}
|
|
|
|
err = json.Unmarshal(data, &varAgentCodingChanges)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AgentCodingChanges(varAgentCodingChanges)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "base")
|
|
delete(additionalProperties, "commits")
|
|
delete(additionalProperties, "files")
|
|
delete(additionalProperties, "head")
|
|
delete(additionalProperties, "moreCommits")
|
|
delete(additionalProperties, "moreFiles")
|
|
delete(additionalProperties, "pull")
|
|
delete(additionalProperties, "repo")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAgentCodingChanges struct {
|
|
value *AgentCodingChanges
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAgentCodingChanges) Get() *AgentCodingChanges {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAgentCodingChanges) Set(val *AgentCodingChanges) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAgentCodingChanges) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAgentCodingChanges) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAgentCodingChanges(val *AgentCodingChanges) *NullableAgentCodingChanges {
|
|
return &NullableAgentCodingChanges{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAgentCodingChanges) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAgentCodingChanges) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|