mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
5.8 KiB
Go
231 lines
5.8 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 AgentCodingPulled type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AgentCodingPulled{}
|
|
|
|
// AgentCodingPulled struct for AgentCodingPulled
|
|
type AgentCodingPulled struct {
|
|
// Base is the branch it proposes into.
|
|
Base *string `json:"base,omitempty"`
|
|
// Number is the pull request's number in its repository.
|
|
Number *int64 `json:"number,omitempty"`
|
|
// URL is where it is read.
|
|
Url *string `json:"url,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AgentCodingPulled AgentCodingPulled
|
|
|
|
// NewAgentCodingPulled instantiates a new AgentCodingPulled 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 NewAgentCodingPulled() *AgentCodingPulled {
|
|
this := AgentCodingPulled{}
|
|
return &this
|
|
}
|
|
|
|
// NewAgentCodingPulledWithDefaults instantiates a new AgentCodingPulled 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 NewAgentCodingPulledWithDefaults() *AgentCodingPulled {
|
|
this := AgentCodingPulled{}
|
|
return &this
|
|
}
|
|
|
|
// GetBase returns the Base field value if set, zero value otherwise.
|
|
func (o *AgentCodingPulled) 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 *AgentCodingPulled) 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 *AgentCodingPulled) 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 *AgentCodingPulled) SetBase(v string) {
|
|
o.Base = &v
|
|
}
|
|
|
|
// GetNumber returns the Number field value if set, zero value otherwise.
|
|
func (o *AgentCodingPulled) GetNumber() int64 {
|
|
if o == nil || IsNil(o.Number) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Number
|
|
}
|
|
|
|
// GetNumberOk returns a tuple with the Number field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingPulled) GetNumberOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Number) {
|
|
return nil, false
|
|
}
|
|
return o.Number, true
|
|
}
|
|
|
|
// HasNumber returns a boolean if a field has been set.
|
|
func (o *AgentCodingPulled) HasNumber() bool {
|
|
if o != nil && !IsNil(o.Number) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNumber gets a reference to the given int64 and assigns it to the Number field.
|
|
func (o *AgentCodingPulled) SetNumber(v int64) {
|
|
o.Number = &v
|
|
}
|
|
|
|
// GetUrl returns the Url field value if set, zero value otherwise.
|
|
func (o *AgentCodingPulled) 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 *AgentCodingPulled) 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 *AgentCodingPulled) 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 *AgentCodingPulled) SetUrl(v string) {
|
|
o.Url = &v
|
|
}
|
|
|
|
func (o AgentCodingPulled) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AgentCodingPulled) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Base) {
|
|
toSerialize["base"] = o.Base
|
|
}
|
|
if !IsNil(o.Number) {
|
|
toSerialize["number"] = o.Number
|
|
}
|
|
if !IsNil(o.Url) {
|
|
toSerialize["url"] = o.Url
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AgentCodingPulled) UnmarshalJSON(data []byte) (err error) {
|
|
varAgentCodingPulled := _AgentCodingPulled{}
|
|
|
|
err = json.Unmarshal(data, &varAgentCodingPulled)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AgentCodingPulled(varAgentCodingPulled)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "base")
|
|
delete(additionalProperties, "number")
|
|
delete(additionalProperties, "url")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAgentCodingPulled struct {
|
|
value *AgentCodingPulled
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAgentCodingPulled) Get() *AgentCodingPulled {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAgentCodingPulled) Set(val *AgentCodingPulled) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAgentCodingPulled) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAgentCodingPulled) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAgentCodingPulled(val *AgentCodingPulled) *NullableAgentCodingPulled {
|
|
return &NullableAgentCodingPulled{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAgentCodingPulled) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAgentCodingPulled) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|