mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
6.9 KiB
Go
269 lines
6.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 AgentCodingCommit type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AgentCodingCommit{}
|
|
|
|
// AgentCodingCommit struct for AgentCodingCommit
|
|
type AgentCodingCommit struct {
|
|
// Author is the commit author's name as git recorded it; a run's own commits are authored by its harness.
|
|
Author *string `json:"author,omitempty"`
|
|
// Date is the author date, RFC 3339 in UTC.
|
|
Date *string `json:"date,omitempty"`
|
|
// Message is the commit's subject — its first line only.
|
|
Message *string `json:"message,omitempty"`
|
|
// SHA is the full commit hash.
|
|
Sha *string `json:"sha,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AgentCodingCommit AgentCodingCommit
|
|
|
|
// NewAgentCodingCommit instantiates a new AgentCodingCommit 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 NewAgentCodingCommit() *AgentCodingCommit {
|
|
this := AgentCodingCommit{}
|
|
return &this
|
|
}
|
|
|
|
// NewAgentCodingCommitWithDefaults instantiates a new AgentCodingCommit 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 NewAgentCodingCommitWithDefaults() *AgentCodingCommit {
|
|
this := AgentCodingCommit{}
|
|
return &this
|
|
}
|
|
|
|
// GetAuthor returns the Author field value if set, zero value otherwise.
|
|
func (o *AgentCodingCommit) GetAuthor() string {
|
|
if o == nil || IsNil(o.Author) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Author
|
|
}
|
|
|
|
// GetAuthorOk returns a tuple with the Author field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingCommit) GetAuthorOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Author) {
|
|
return nil, false
|
|
}
|
|
return o.Author, true
|
|
}
|
|
|
|
// HasAuthor returns a boolean if a field has been set.
|
|
func (o *AgentCodingCommit) HasAuthor() bool {
|
|
if o != nil && !IsNil(o.Author) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAuthor gets a reference to the given string and assigns it to the Author field.
|
|
func (o *AgentCodingCommit) SetAuthor(v string) {
|
|
o.Author = &v
|
|
}
|
|
|
|
// GetDate returns the Date field value if set, zero value otherwise.
|
|
func (o *AgentCodingCommit) GetDate() string {
|
|
if o == nil || IsNil(o.Date) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Date
|
|
}
|
|
|
|
// GetDateOk returns a tuple with the Date field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingCommit) GetDateOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Date) {
|
|
return nil, false
|
|
}
|
|
return o.Date, true
|
|
}
|
|
|
|
// HasDate returns a boolean if a field has been set.
|
|
func (o *AgentCodingCommit) HasDate() bool {
|
|
if o != nil && !IsNil(o.Date) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDate gets a reference to the given string and assigns it to the Date field.
|
|
func (o *AgentCodingCommit) SetDate(v string) {
|
|
o.Date = &v
|
|
}
|
|
|
|
// GetMessage returns the Message field value if set, zero value otherwise.
|
|
func (o *AgentCodingCommit) GetMessage() string {
|
|
if o == nil || IsNil(o.Message) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Message
|
|
}
|
|
|
|
// GetMessageOk returns a tuple with the Message field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingCommit) GetMessageOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Message) {
|
|
return nil, false
|
|
}
|
|
return o.Message, true
|
|
}
|
|
|
|
// HasMessage returns a boolean if a field has been set.
|
|
func (o *AgentCodingCommit) HasMessage() bool {
|
|
if o != nil && !IsNil(o.Message) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMessage gets a reference to the given string and assigns it to the Message field.
|
|
func (o *AgentCodingCommit) SetMessage(v string) {
|
|
o.Message = &v
|
|
}
|
|
|
|
// GetSha returns the Sha field value if set, zero value otherwise.
|
|
func (o *AgentCodingCommit) GetSha() string {
|
|
if o == nil || IsNil(o.Sha) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Sha
|
|
}
|
|
|
|
// GetShaOk returns a tuple with the Sha field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingCommit) GetShaOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Sha) {
|
|
return nil, false
|
|
}
|
|
return o.Sha, true
|
|
}
|
|
|
|
// HasSha returns a boolean if a field has been set.
|
|
func (o *AgentCodingCommit) HasSha() bool {
|
|
if o != nil && !IsNil(o.Sha) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSha gets a reference to the given string and assigns it to the Sha field.
|
|
func (o *AgentCodingCommit) SetSha(v string) {
|
|
o.Sha = &v
|
|
}
|
|
|
|
func (o AgentCodingCommit) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AgentCodingCommit) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Author) {
|
|
toSerialize["author"] = o.Author
|
|
}
|
|
if !IsNil(o.Date) {
|
|
toSerialize["date"] = o.Date
|
|
}
|
|
if !IsNil(o.Message) {
|
|
toSerialize["message"] = o.Message
|
|
}
|
|
if !IsNil(o.Sha) {
|
|
toSerialize["sha"] = o.Sha
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AgentCodingCommit) UnmarshalJSON(data []byte) (err error) {
|
|
varAgentCodingCommit := _AgentCodingCommit{}
|
|
|
|
err = json.Unmarshal(data, &varAgentCodingCommit)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AgentCodingCommit(varAgentCodingCommit)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "author")
|
|
delete(additionalProperties, "date")
|
|
delete(additionalProperties, "message")
|
|
delete(additionalProperties, "sha")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAgentCodingCommit struct {
|
|
value *AgentCodingCommit
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAgentCodingCommit) Get() *AgentCodingCommit {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAgentCodingCommit) Set(val *AgentCodingCommit) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAgentCodingCommit) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAgentCodingCommit) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAgentCodingCommit(val *AgentCodingCommit) *NullableAgentCodingCommit {
|
|
return &NullableAgentCodingCommit{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAgentCodingCommit) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAgentCodingCommit) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|