Files
sdk/model_agent_coding_merged.go

269 lines
6.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 AgentCodingMerged type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AgentCodingMerged{}
// AgentCodingMerged struct for AgentCodingMerged
type AgentCodingMerged struct {
// Base is the branch it was merged into.
Base *string `json:"base,omitempty"`
// Number is the pull request's number in its repository.
Number *int64 `json:"number,omitempty"`
// State is merged.
State *string `json:"state,omitempty"`
// URL is where it is read.
Url *string `json:"url,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AgentCodingMerged AgentCodingMerged
// NewAgentCodingMerged instantiates a new AgentCodingMerged 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 NewAgentCodingMerged() *AgentCodingMerged {
this := AgentCodingMerged{}
return &this
}
// NewAgentCodingMergedWithDefaults instantiates a new AgentCodingMerged 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 NewAgentCodingMergedWithDefaults() *AgentCodingMerged {
this := AgentCodingMerged{}
return &this
}
// GetBase returns the Base field value if set, zero value otherwise.
func (o *AgentCodingMerged) 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 *AgentCodingMerged) 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 *AgentCodingMerged) 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 *AgentCodingMerged) SetBase(v string) {
o.Base = &v
}
// GetNumber returns the Number field value if set, zero value otherwise.
func (o *AgentCodingMerged) 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 *AgentCodingMerged) 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 *AgentCodingMerged) 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 *AgentCodingMerged) SetNumber(v int64) {
o.Number = &v
}
// GetState returns the State field value if set, zero value otherwise.
func (o *AgentCodingMerged) GetState() string {
if o == nil || IsNil(o.State) {
var ret string
return ret
}
return *o.State
}
// GetStateOk returns a tuple with the State field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentCodingMerged) GetStateOk() (*string, bool) {
if o == nil || IsNil(o.State) {
return nil, false
}
return o.State, true
}
// HasState returns a boolean if a field has been set.
func (o *AgentCodingMerged) HasState() bool {
if o != nil && !IsNil(o.State) {
return true
}
return false
}
// SetState gets a reference to the given string and assigns it to the State field.
func (o *AgentCodingMerged) SetState(v string) {
o.State = &v
}
// GetUrl returns the Url field value if set, zero value otherwise.
func (o *AgentCodingMerged) 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 *AgentCodingMerged) 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 *AgentCodingMerged) 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 *AgentCodingMerged) SetUrl(v string) {
o.Url = &v
}
func (o AgentCodingMerged) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AgentCodingMerged) 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.State) {
toSerialize["state"] = o.State
}
if !IsNil(o.Url) {
toSerialize["url"] = o.Url
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AgentCodingMerged) UnmarshalJSON(data []byte) (err error) {
varAgentCodingMerged := _AgentCodingMerged{}
err = json.Unmarshal(data, &varAgentCodingMerged)
if err != nil {
return err
}
*o = AgentCodingMerged(varAgentCodingMerged)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "base")
delete(additionalProperties, "number")
delete(additionalProperties, "state")
delete(additionalProperties, "url")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAgentCodingMerged struct {
value *AgentCodingMerged
isSet bool
}
func (v NullableAgentCodingMerged) Get() *AgentCodingMerged {
return v.value
}
func (v *NullableAgentCodingMerged) Set(val *AgentCodingMerged) {
v.value = val
v.isSet = true
}
func (v NullableAgentCodingMerged) IsSet() bool {
return v.isSet
}
func (v *NullableAgentCodingMerged) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAgentCodingMerged(val *AgentCodingMerged) *NullableAgentCodingMerged {
return &NullableAgentCodingMerged{value: val, isSet: true}
}
func (v NullableAgentCodingMerged) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAgentCodingMerged) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}