mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
497 lines
12 KiB
Go
497 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 FormDelivery type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &FormDelivery{}
|
|
|
|
// FormDelivery struct for FormDelivery
|
|
type FormDelivery struct {
|
|
// Attempts is how many posts were made.
|
|
Attempts *int64 `json:"attempts,omitempty"`
|
|
// Code is the last HTTP status the address answered; 0 when it did not answer.
|
|
Code *int64 `json:"code,omitempty"`
|
|
// Created is when the first attempt was made, RFC 3339.
|
|
Created *string `json:"created,omitempty"`
|
|
// Error is why the last attempt failed.
|
|
Error *string `json:"error,omitempty"`
|
|
// ID is the delivery's id; the body carries it as event_id.
|
|
Id *string `json:"id,omitempty"`
|
|
// Next is when the next attempt is due, RFC 3339; empty when none is.
|
|
Next *string `json:"next,omitempty"`
|
|
// Response is the response's id.
|
|
Response *string `json:"response,omitempty"`
|
|
// Status is delivered, retrying or failed.
|
|
Status *string `json:"status,omitempty"`
|
|
// Updated is when the last was, RFC 3339.
|
|
Updated *string `json:"updated,omitempty"`
|
|
// Webhook is the webhook's id.
|
|
Webhook *string `json:"webhook,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _FormDelivery FormDelivery
|
|
|
|
// NewFormDelivery instantiates a new FormDelivery 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 NewFormDelivery() *FormDelivery {
|
|
this := FormDelivery{}
|
|
return &this
|
|
}
|
|
|
|
// NewFormDeliveryWithDefaults instantiates a new FormDelivery 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 NewFormDeliveryWithDefaults() *FormDelivery {
|
|
this := FormDelivery{}
|
|
return &this
|
|
}
|
|
|
|
// GetAttempts returns the Attempts field value if set, zero value otherwise.
|
|
func (o *FormDelivery) GetAttempts() int64 {
|
|
if o == nil || IsNil(o.Attempts) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Attempts
|
|
}
|
|
|
|
// GetAttemptsOk returns a tuple with the Attempts field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormDelivery) GetAttemptsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Attempts) {
|
|
return nil, false
|
|
}
|
|
return o.Attempts, true
|
|
}
|
|
|
|
// HasAttempts returns a boolean if a field has been set.
|
|
func (o *FormDelivery) HasAttempts() bool {
|
|
if o != nil && !IsNil(o.Attempts) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAttempts gets a reference to the given int64 and assigns it to the Attempts field.
|
|
func (o *FormDelivery) SetAttempts(v int64) {
|
|
o.Attempts = &v
|
|
}
|
|
|
|
// GetCode returns the Code field value if set, zero value otherwise.
|
|
func (o *FormDelivery) GetCode() int64 {
|
|
if o == nil || IsNil(o.Code) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Code
|
|
}
|
|
|
|
// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormDelivery) GetCodeOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Code) {
|
|
return nil, false
|
|
}
|
|
return o.Code, true
|
|
}
|
|
|
|
// HasCode returns a boolean if a field has been set.
|
|
func (o *FormDelivery) HasCode() bool {
|
|
if o != nil && !IsNil(o.Code) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCode gets a reference to the given int64 and assigns it to the Code field.
|
|
func (o *FormDelivery) SetCode(v int64) {
|
|
o.Code = &v
|
|
}
|
|
|
|
// GetCreated returns the Created field value if set, zero value otherwise.
|
|
func (o *FormDelivery) GetCreated() string {
|
|
if o == nil || IsNil(o.Created) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Created
|
|
}
|
|
|
|
// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormDelivery) GetCreatedOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Created) {
|
|
return nil, false
|
|
}
|
|
return o.Created, true
|
|
}
|
|
|
|
// HasCreated returns a boolean if a field has been set.
|
|
func (o *FormDelivery) HasCreated() bool {
|
|
if o != nil && !IsNil(o.Created) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreated gets a reference to the given string and assigns it to the Created field.
|
|
func (o *FormDelivery) SetCreated(v string) {
|
|
o.Created = &v
|
|
}
|
|
|
|
// GetError returns the Error field value if set, zero value otherwise.
|
|
func (o *FormDelivery) GetError() string {
|
|
if o == nil || IsNil(o.Error) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Error
|
|
}
|
|
|
|
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormDelivery) GetErrorOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Error) {
|
|
return nil, false
|
|
}
|
|
return o.Error, true
|
|
}
|
|
|
|
// HasError returns a boolean if a field has been set.
|
|
func (o *FormDelivery) HasError() bool {
|
|
if o != nil && !IsNil(o.Error) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetError gets a reference to the given string and assigns it to the Error field.
|
|
func (o *FormDelivery) SetError(v string) {
|
|
o.Error = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *FormDelivery) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormDelivery) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *FormDelivery) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *FormDelivery) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetNext returns the Next field value if set, zero value otherwise.
|
|
func (o *FormDelivery) GetNext() string {
|
|
if o == nil || IsNil(o.Next) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Next
|
|
}
|
|
|
|
// GetNextOk returns a tuple with the Next field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormDelivery) GetNextOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Next) {
|
|
return nil, false
|
|
}
|
|
return o.Next, true
|
|
}
|
|
|
|
// HasNext returns a boolean if a field has been set.
|
|
func (o *FormDelivery) HasNext() bool {
|
|
if o != nil && !IsNil(o.Next) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNext gets a reference to the given string and assigns it to the Next field.
|
|
func (o *FormDelivery) SetNext(v string) {
|
|
o.Next = &v
|
|
}
|
|
|
|
// GetResponse returns the Response field value if set, zero value otherwise.
|
|
func (o *FormDelivery) GetResponse() string {
|
|
if o == nil || IsNil(o.Response) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Response
|
|
}
|
|
|
|
// GetResponseOk returns a tuple with the Response field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormDelivery) GetResponseOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Response) {
|
|
return nil, false
|
|
}
|
|
return o.Response, true
|
|
}
|
|
|
|
// HasResponse returns a boolean if a field has been set.
|
|
func (o *FormDelivery) HasResponse() bool {
|
|
if o != nil && !IsNil(o.Response) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetResponse gets a reference to the given string and assigns it to the Response field.
|
|
func (o *FormDelivery) SetResponse(v string) {
|
|
o.Response = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *FormDelivery) GetStatus() string {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormDelivery) GetStatusOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return nil, false
|
|
}
|
|
return o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *FormDelivery) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
|
func (o *FormDelivery) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetUpdated returns the Updated field value if set, zero value otherwise.
|
|
func (o *FormDelivery) GetUpdated() string {
|
|
if o == nil || IsNil(o.Updated) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Updated
|
|
}
|
|
|
|
// GetUpdatedOk returns a tuple with the Updated field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormDelivery) GetUpdatedOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Updated) {
|
|
return nil, false
|
|
}
|
|
return o.Updated, true
|
|
}
|
|
|
|
// HasUpdated returns a boolean if a field has been set.
|
|
func (o *FormDelivery) HasUpdated() bool {
|
|
if o != nil && !IsNil(o.Updated) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUpdated gets a reference to the given string and assigns it to the Updated field.
|
|
func (o *FormDelivery) SetUpdated(v string) {
|
|
o.Updated = &v
|
|
}
|
|
|
|
// GetWebhook returns the Webhook field value if set, zero value otherwise.
|
|
func (o *FormDelivery) GetWebhook() string {
|
|
if o == nil || IsNil(o.Webhook) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Webhook
|
|
}
|
|
|
|
// GetWebhookOk returns a tuple with the Webhook field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormDelivery) GetWebhookOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Webhook) {
|
|
return nil, false
|
|
}
|
|
return o.Webhook, true
|
|
}
|
|
|
|
// HasWebhook returns a boolean if a field has been set.
|
|
func (o *FormDelivery) HasWebhook() bool {
|
|
if o != nil && !IsNil(o.Webhook) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetWebhook gets a reference to the given string and assigns it to the Webhook field.
|
|
func (o *FormDelivery) SetWebhook(v string) {
|
|
o.Webhook = &v
|
|
}
|
|
|
|
func (o FormDelivery) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o FormDelivery) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Attempts) {
|
|
toSerialize["attempts"] = o.Attempts
|
|
}
|
|
if !IsNil(o.Code) {
|
|
toSerialize["code"] = o.Code
|
|
}
|
|
if !IsNil(o.Created) {
|
|
toSerialize["created"] = o.Created
|
|
}
|
|
if !IsNil(o.Error) {
|
|
toSerialize["error"] = o.Error
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Next) {
|
|
toSerialize["next"] = o.Next
|
|
}
|
|
if !IsNil(o.Response) {
|
|
toSerialize["response"] = o.Response
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
if !IsNil(o.Updated) {
|
|
toSerialize["updated"] = o.Updated
|
|
}
|
|
if !IsNil(o.Webhook) {
|
|
toSerialize["webhook"] = o.Webhook
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *FormDelivery) UnmarshalJSON(data []byte) (err error) {
|
|
varFormDelivery := _FormDelivery{}
|
|
|
|
err = json.Unmarshal(data, &varFormDelivery)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = FormDelivery(varFormDelivery)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "attempts")
|
|
delete(additionalProperties, "code")
|
|
delete(additionalProperties, "created")
|
|
delete(additionalProperties, "error")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "next")
|
|
delete(additionalProperties, "response")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "updated")
|
|
delete(additionalProperties, "webhook")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableFormDelivery struct {
|
|
value *FormDelivery
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFormDelivery) Get() *FormDelivery {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFormDelivery) Set(val *FormDelivery) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFormDelivery) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFormDelivery) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFormDelivery(val *FormDelivery) *NullableFormDelivery {
|
|
return &NullableFormDelivery{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFormDelivery) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFormDelivery) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|