Files
sdk/model_marketing_step_input.go

269 lines
7.1 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 MarketingStepInput type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &MarketingStepInput{}
// MarketingStepInput struct for MarketingStepInput
type MarketingStepInput struct {
// Body is the message text. Required.
Body *string `json:"body,omitempty"`
// DelaySeconds is how long after the previous step this one sends (after enrollment, for the first step). Must be >= 0.
DelaySeconds *int64 `json:"delaySeconds,omitempty"`
// SequenceID is the sequence id from the path (the route's :id).
Id *string `json:"id,omitempty"`
// Subject is the email subject line, capped at 1024 bytes.
Subject *string `json:"subject,omitempty"`
AdditionalProperties map[string]interface{}
}
type _MarketingStepInput MarketingStepInput
// NewMarketingStepInput instantiates a new MarketingStepInput 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 NewMarketingStepInput() *MarketingStepInput {
this := MarketingStepInput{}
return &this
}
// NewMarketingStepInputWithDefaults instantiates a new MarketingStepInput 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 NewMarketingStepInputWithDefaults() *MarketingStepInput {
this := MarketingStepInput{}
return &this
}
// GetBody returns the Body field value if set, zero value otherwise.
func (o *MarketingStepInput) GetBody() string {
if o == nil || IsNil(o.Body) {
var ret string
return ret
}
return *o.Body
}
// GetBodyOk returns a tuple with the Body field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MarketingStepInput) GetBodyOk() (*string, bool) {
if o == nil || IsNil(o.Body) {
return nil, false
}
return o.Body, true
}
// HasBody returns a boolean if a field has been set.
func (o *MarketingStepInput) HasBody() bool {
if o != nil && !IsNil(o.Body) {
return true
}
return false
}
// SetBody gets a reference to the given string and assigns it to the Body field.
func (o *MarketingStepInput) SetBody(v string) {
o.Body = &v
}
// GetDelaySeconds returns the DelaySeconds field value if set, zero value otherwise.
func (o *MarketingStepInput) GetDelaySeconds() int64 {
if o == nil || IsNil(o.DelaySeconds) {
var ret int64
return ret
}
return *o.DelaySeconds
}
// GetDelaySecondsOk returns a tuple with the DelaySeconds field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MarketingStepInput) GetDelaySecondsOk() (*int64, bool) {
if o == nil || IsNil(o.DelaySeconds) {
return nil, false
}
return o.DelaySeconds, true
}
// HasDelaySeconds returns a boolean if a field has been set.
func (o *MarketingStepInput) HasDelaySeconds() bool {
if o != nil && !IsNil(o.DelaySeconds) {
return true
}
return false
}
// SetDelaySeconds gets a reference to the given int64 and assigns it to the DelaySeconds field.
func (o *MarketingStepInput) SetDelaySeconds(v int64) {
o.DelaySeconds = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *MarketingStepInput) 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 *MarketingStepInput) 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 *MarketingStepInput) 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 *MarketingStepInput) SetId(v string) {
o.Id = &v
}
// GetSubject returns the Subject field value if set, zero value otherwise.
func (o *MarketingStepInput) GetSubject() string {
if o == nil || IsNil(o.Subject) {
var ret string
return ret
}
return *o.Subject
}
// GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MarketingStepInput) GetSubjectOk() (*string, bool) {
if o == nil || IsNil(o.Subject) {
return nil, false
}
return o.Subject, true
}
// HasSubject returns a boolean if a field has been set.
func (o *MarketingStepInput) HasSubject() bool {
if o != nil && !IsNil(o.Subject) {
return true
}
return false
}
// SetSubject gets a reference to the given string and assigns it to the Subject field.
func (o *MarketingStepInput) SetSubject(v string) {
o.Subject = &v
}
func (o MarketingStepInput) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o MarketingStepInput) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Body) {
toSerialize["body"] = o.Body
}
if !IsNil(o.DelaySeconds) {
toSerialize["delaySeconds"] = o.DelaySeconds
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Subject) {
toSerialize["subject"] = o.Subject
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *MarketingStepInput) UnmarshalJSON(data []byte) (err error) {
varMarketingStepInput := _MarketingStepInput{}
err = json.Unmarshal(data, &varMarketingStepInput)
if err != nil {
return err
}
*o = MarketingStepInput(varMarketingStepInput)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "body")
delete(additionalProperties, "delaySeconds")
delete(additionalProperties, "id")
delete(additionalProperties, "subject")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableMarketingStepInput struct {
value *MarketingStepInput
isSet bool
}
func (v NullableMarketingStepInput) Get() *MarketingStepInput {
return v.value
}
func (v *NullableMarketingStepInput) Set(val *MarketingStepInput) {
v.value = val
v.isSet = true
}
func (v NullableMarketingStepInput) IsSet() bool {
return v.isSet
}
func (v *NullableMarketingStepInput) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableMarketingStepInput(val *MarketingStepInput) *NullableMarketingStepInput {
return &NullableMarketingStepInput{value: val, isSet: true}
}
func (v NullableMarketingStepInput) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableMarketingStepInput) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}