mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
194 lines
4.6 KiB
Go
194 lines
4.6 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"
|
|
"time"
|
|
)
|
|
|
|
// checks if the EmailPoint type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &EmailPoint{}
|
|
|
|
// EmailPoint struct for EmailPoint
|
|
type EmailPoint struct {
|
|
// At is the start of the day or hour, UTC.
|
|
At *time.Time `json:"at,omitempty"`
|
|
// Tally is its mail counted.
|
|
Tally *EmailTally `json:"tally,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _EmailPoint EmailPoint
|
|
|
|
// NewEmailPoint instantiates a new EmailPoint 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 NewEmailPoint() *EmailPoint {
|
|
this := EmailPoint{}
|
|
return &this
|
|
}
|
|
|
|
// NewEmailPointWithDefaults instantiates a new EmailPoint 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 NewEmailPointWithDefaults() *EmailPoint {
|
|
this := EmailPoint{}
|
|
return &this
|
|
}
|
|
|
|
// GetAt returns the At field value if set, zero value otherwise.
|
|
func (o *EmailPoint) GetAt() time.Time {
|
|
if o == nil || IsNil(o.At) {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
return *o.At
|
|
}
|
|
|
|
// GetAtOk returns a tuple with the At field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailPoint) GetAtOk() (*time.Time, bool) {
|
|
if o == nil || IsNil(o.At) {
|
|
return nil, false
|
|
}
|
|
return o.At, true
|
|
}
|
|
|
|
// HasAt returns a boolean if a field has been set.
|
|
func (o *EmailPoint) HasAt() bool {
|
|
if o != nil && !IsNil(o.At) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAt gets a reference to the given time.Time and assigns it to the At field.
|
|
func (o *EmailPoint) SetAt(v time.Time) {
|
|
o.At = &v
|
|
}
|
|
|
|
// GetTally returns the Tally field value if set, zero value otherwise.
|
|
func (o *EmailPoint) GetTally() EmailTally {
|
|
if o == nil || IsNil(o.Tally) {
|
|
var ret EmailTally
|
|
return ret
|
|
}
|
|
return *o.Tally
|
|
}
|
|
|
|
// GetTallyOk returns a tuple with the Tally field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailPoint) GetTallyOk() (*EmailTally, bool) {
|
|
if o == nil || IsNil(o.Tally) {
|
|
return nil, false
|
|
}
|
|
return o.Tally, true
|
|
}
|
|
|
|
// HasTally returns a boolean if a field has been set.
|
|
func (o *EmailPoint) HasTally() bool {
|
|
if o != nil && !IsNil(o.Tally) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTally gets a reference to the given EmailTally and assigns it to the Tally field.
|
|
func (o *EmailPoint) SetTally(v EmailTally) {
|
|
o.Tally = &v
|
|
}
|
|
|
|
func (o EmailPoint) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o EmailPoint) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.At) {
|
|
toSerialize["at"] = o.At
|
|
}
|
|
if !IsNil(o.Tally) {
|
|
toSerialize["tally"] = o.Tally
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *EmailPoint) UnmarshalJSON(data []byte) (err error) {
|
|
varEmailPoint := _EmailPoint{}
|
|
|
|
err = json.Unmarshal(data, &varEmailPoint)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = EmailPoint(varEmailPoint)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "at")
|
|
delete(additionalProperties, "tally")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableEmailPoint struct {
|
|
value *EmailPoint
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableEmailPoint) Get() *EmailPoint {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableEmailPoint) Set(val *EmailPoint) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableEmailPoint) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableEmailPoint) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableEmailPoint(val *EmailPoint) *NullableEmailPoint {
|
|
return &NullableEmailPoint{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableEmailPoint) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableEmailPoint) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|