Files
sdk/model_marketing_schedule_input.go

193 lines
5.2 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 MarketingScheduleInput type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &MarketingScheduleInput{}
// MarketingScheduleInput struct for MarketingScheduleInput
type MarketingScheduleInput struct {
// ID is the campaign id from the path.
Id *string `json:"id,omitempty"`
// ScheduledAt is the unix send time. 0 clears the schedule.
ScheduledAt *int64 `json:"scheduledAt,omitempty"`
AdditionalProperties map[string]interface{}
}
type _MarketingScheduleInput MarketingScheduleInput
// NewMarketingScheduleInput instantiates a new MarketingScheduleInput 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 NewMarketingScheduleInput() *MarketingScheduleInput {
this := MarketingScheduleInput{}
return &this
}
// NewMarketingScheduleInputWithDefaults instantiates a new MarketingScheduleInput 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 NewMarketingScheduleInputWithDefaults() *MarketingScheduleInput {
this := MarketingScheduleInput{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *MarketingScheduleInput) 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 *MarketingScheduleInput) 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 *MarketingScheduleInput) 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 *MarketingScheduleInput) SetId(v string) {
o.Id = &v
}
// GetScheduledAt returns the ScheduledAt field value if set, zero value otherwise.
func (o *MarketingScheduleInput) GetScheduledAt() int64 {
if o == nil || IsNil(o.ScheduledAt) {
var ret int64
return ret
}
return *o.ScheduledAt
}
// GetScheduledAtOk returns a tuple with the ScheduledAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MarketingScheduleInput) GetScheduledAtOk() (*int64, bool) {
if o == nil || IsNil(o.ScheduledAt) {
return nil, false
}
return o.ScheduledAt, true
}
// HasScheduledAt returns a boolean if a field has been set.
func (o *MarketingScheduleInput) HasScheduledAt() bool {
if o != nil && !IsNil(o.ScheduledAt) {
return true
}
return false
}
// SetScheduledAt gets a reference to the given int64 and assigns it to the ScheduledAt field.
func (o *MarketingScheduleInput) SetScheduledAt(v int64) {
o.ScheduledAt = &v
}
func (o MarketingScheduleInput) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o MarketingScheduleInput) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.ScheduledAt) {
toSerialize["scheduledAt"] = o.ScheduledAt
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *MarketingScheduleInput) UnmarshalJSON(data []byte) (err error) {
varMarketingScheduleInput := _MarketingScheduleInput{}
err = json.Unmarshal(data, &varMarketingScheduleInput)
if err != nil {
return err
}
*o = MarketingScheduleInput(varMarketingScheduleInput)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "id")
delete(additionalProperties, "scheduledAt")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableMarketingScheduleInput struct {
value *MarketingScheduleInput
isSet bool
}
func (v NullableMarketingScheduleInput) Get() *MarketingScheduleInput {
return v.value
}
func (v *NullableMarketingScheduleInput) Set(val *MarketingScheduleInput) {
v.value = val
v.isSet = true
}
func (v NullableMarketingScheduleInput) IsSet() bool {
return v.isSet
}
func (v *NullableMarketingScheduleInput) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableMarketingScheduleInput(val *MarketingScheduleInput) *NullableMarketingScheduleInput {
return &NullableMarketingScheduleInput{value: val, isSet: true}
}
func (v NullableMarketingScheduleInput) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableMarketingScheduleInput) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}