mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
307 lines
7.9 KiB
Go
307 lines
7.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 AgentCodingPullIn type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AgentCodingPullIn{}
|
|
|
|
// AgentCodingPullIn struct for AgentCodingPullIn
|
|
type AgentCodingPullIn struct {
|
|
// Base is the branch to propose into. Empty is the branch the run started from.
|
|
Base *string `json:"base,omitempty"`
|
|
// Body is its description. Empty says who it is for, the task, the branch and the run it came from.
|
|
Body *string `json:"body,omitempty"`
|
|
// Draft opens it as a draft, which a reviewer cannot merge until it is ready.
|
|
Draft *bool `json:"draft,omitempty"`
|
|
// Session is the run's handle, from the path.
|
|
Session *string `json:"session,omitempty"`
|
|
// Title is the pull request's title. Empty takes one from the run's task.
|
|
Title *string `json:"title,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AgentCodingPullIn AgentCodingPullIn
|
|
|
|
// NewAgentCodingPullIn instantiates a new AgentCodingPullIn 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 NewAgentCodingPullIn() *AgentCodingPullIn {
|
|
this := AgentCodingPullIn{}
|
|
return &this
|
|
}
|
|
|
|
// NewAgentCodingPullInWithDefaults instantiates a new AgentCodingPullIn 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 NewAgentCodingPullInWithDefaults() *AgentCodingPullIn {
|
|
this := AgentCodingPullIn{}
|
|
return &this
|
|
}
|
|
|
|
// GetBase returns the Base field value if set, zero value otherwise.
|
|
func (o *AgentCodingPullIn) 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 *AgentCodingPullIn) 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 *AgentCodingPullIn) 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 *AgentCodingPullIn) SetBase(v string) {
|
|
o.Base = &v
|
|
}
|
|
|
|
// GetBody returns the Body field value if set, zero value otherwise.
|
|
func (o *AgentCodingPullIn) GetBody() string {
|
|
if o == nil || IsNil(o.Body) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Body
|
|
}
|
|
|
|
// GetBodyOk returns a tuple with the Body field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingPullIn) GetBodyOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Body) {
|
|
return nil, false
|
|
}
|
|
return o.Body, true
|
|
}
|
|
|
|
// HasBody returns a boolean if a field has been set.
|
|
func (o *AgentCodingPullIn) HasBody() bool {
|
|
if o != nil && !IsNil(o.Body) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBody gets a reference to the given string and assigns it to the Body field.
|
|
func (o *AgentCodingPullIn) SetBody(v string) {
|
|
o.Body = &v
|
|
}
|
|
|
|
// GetDraft returns the Draft field value if set, zero value otherwise.
|
|
func (o *AgentCodingPullIn) GetDraft() bool {
|
|
if o == nil || IsNil(o.Draft) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Draft
|
|
}
|
|
|
|
// GetDraftOk returns a tuple with the Draft field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingPullIn) GetDraftOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Draft) {
|
|
return nil, false
|
|
}
|
|
return o.Draft, true
|
|
}
|
|
|
|
// HasDraft returns a boolean if a field has been set.
|
|
func (o *AgentCodingPullIn) HasDraft() bool {
|
|
if o != nil && !IsNil(o.Draft) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDraft gets a reference to the given bool and assigns it to the Draft field.
|
|
func (o *AgentCodingPullIn) SetDraft(v bool) {
|
|
o.Draft = &v
|
|
}
|
|
|
|
// GetSession returns the Session field value if set, zero value otherwise.
|
|
func (o *AgentCodingPullIn) GetSession() string {
|
|
if o == nil || IsNil(o.Session) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Session
|
|
}
|
|
|
|
// GetSessionOk returns a tuple with the Session field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingPullIn) GetSessionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Session) {
|
|
return nil, false
|
|
}
|
|
return o.Session, true
|
|
}
|
|
|
|
// HasSession returns a boolean if a field has been set.
|
|
func (o *AgentCodingPullIn) HasSession() bool {
|
|
if o != nil && !IsNil(o.Session) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSession gets a reference to the given string and assigns it to the Session field.
|
|
func (o *AgentCodingPullIn) SetSession(v string) {
|
|
o.Session = &v
|
|
}
|
|
|
|
// GetTitle returns the Title field value if set, zero value otherwise.
|
|
func (o *AgentCodingPullIn) GetTitle() string {
|
|
if o == nil || IsNil(o.Title) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Title
|
|
}
|
|
|
|
// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingPullIn) GetTitleOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Title) {
|
|
return nil, false
|
|
}
|
|
return o.Title, true
|
|
}
|
|
|
|
// HasTitle returns a boolean if a field has been set.
|
|
func (o *AgentCodingPullIn) HasTitle() bool {
|
|
if o != nil && !IsNil(o.Title) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTitle gets a reference to the given string and assigns it to the Title field.
|
|
func (o *AgentCodingPullIn) SetTitle(v string) {
|
|
o.Title = &v
|
|
}
|
|
|
|
func (o AgentCodingPullIn) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AgentCodingPullIn) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Base) {
|
|
toSerialize["base"] = o.Base
|
|
}
|
|
if !IsNil(o.Body) {
|
|
toSerialize["body"] = o.Body
|
|
}
|
|
if !IsNil(o.Draft) {
|
|
toSerialize["draft"] = o.Draft
|
|
}
|
|
if !IsNil(o.Session) {
|
|
toSerialize["session"] = o.Session
|
|
}
|
|
if !IsNil(o.Title) {
|
|
toSerialize["title"] = o.Title
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AgentCodingPullIn) UnmarshalJSON(data []byte) (err error) {
|
|
varAgentCodingPullIn := _AgentCodingPullIn{}
|
|
|
|
err = json.Unmarshal(data, &varAgentCodingPullIn)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AgentCodingPullIn(varAgentCodingPullIn)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "base")
|
|
delete(additionalProperties, "body")
|
|
delete(additionalProperties, "draft")
|
|
delete(additionalProperties, "session")
|
|
delete(additionalProperties, "title")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAgentCodingPullIn struct {
|
|
value *AgentCodingPullIn
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAgentCodingPullIn) Get() *AgentCodingPullIn {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAgentCodingPullIn) Set(val *AgentCodingPullIn) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAgentCodingPullIn) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAgentCodingPullIn) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAgentCodingPullIn(val *AgentCodingPullIn) *NullableAgentCodingPullIn {
|
|
return &NullableAgentCodingPullIn{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAgentCodingPullIn) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAgentCodingPullIn) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|