mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
5.5 KiB
Go
193 lines
5.5 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 MarketingSequenceView type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &MarketingSequenceView{}
|
|
|
|
// MarketingSequenceView struct for MarketingSequenceView
|
|
type MarketingSequenceView struct {
|
|
// Sequence is the definition itself — the same record create and the list return. Its status is the one that decides whether enroll is accepted.
|
|
Sequence *MarketingSequence `json:"sequence,omitempty"`
|
|
// Steps are in send order (idx ascending); empty for a sequence with no messages yet, which enrolls fine and completes immediately.
|
|
Steps []MarketingStep `json:"steps,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _MarketingSequenceView MarketingSequenceView
|
|
|
|
// NewMarketingSequenceView instantiates a new MarketingSequenceView 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 NewMarketingSequenceView() *MarketingSequenceView {
|
|
this := MarketingSequenceView{}
|
|
return &this
|
|
}
|
|
|
|
// NewMarketingSequenceViewWithDefaults instantiates a new MarketingSequenceView 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 NewMarketingSequenceViewWithDefaults() *MarketingSequenceView {
|
|
this := MarketingSequenceView{}
|
|
return &this
|
|
}
|
|
|
|
// GetSequence returns the Sequence field value if set, zero value otherwise.
|
|
func (o *MarketingSequenceView) GetSequence() MarketingSequence {
|
|
if o == nil || IsNil(o.Sequence) {
|
|
var ret MarketingSequence
|
|
return ret
|
|
}
|
|
return *o.Sequence
|
|
}
|
|
|
|
// GetSequenceOk returns a tuple with the Sequence field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MarketingSequenceView) GetSequenceOk() (*MarketingSequence, bool) {
|
|
if o == nil || IsNil(o.Sequence) {
|
|
return nil, false
|
|
}
|
|
return o.Sequence, true
|
|
}
|
|
|
|
// HasSequence returns a boolean if a field has been set.
|
|
func (o *MarketingSequenceView) HasSequence() bool {
|
|
if o != nil && !IsNil(o.Sequence) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSequence gets a reference to the given MarketingSequence and assigns it to the Sequence field.
|
|
func (o *MarketingSequenceView) SetSequence(v MarketingSequence) {
|
|
o.Sequence = &v
|
|
}
|
|
|
|
// GetSteps returns the Steps field value if set, zero value otherwise.
|
|
func (o *MarketingSequenceView) GetSteps() []MarketingStep {
|
|
if o == nil || IsNil(o.Steps) {
|
|
var ret []MarketingStep
|
|
return ret
|
|
}
|
|
return o.Steps
|
|
}
|
|
|
|
// GetStepsOk returns a tuple with the Steps field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MarketingSequenceView) GetStepsOk() ([]MarketingStep, bool) {
|
|
if o == nil || IsNil(o.Steps) {
|
|
return nil, false
|
|
}
|
|
return o.Steps, true
|
|
}
|
|
|
|
// HasSteps returns a boolean if a field has been set.
|
|
func (o *MarketingSequenceView) HasSteps() bool {
|
|
if o != nil && !IsNil(o.Steps) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSteps gets a reference to the given []MarketingStep and assigns it to the Steps field.
|
|
func (o *MarketingSequenceView) SetSteps(v []MarketingStep) {
|
|
o.Steps = v
|
|
}
|
|
|
|
func (o MarketingSequenceView) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o MarketingSequenceView) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Sequence) {
|
|
toSerialize["sequence"] = o.Sequence
|
|
}
|
|
if !IsNil(o.Steps) {
|
|
toSerialize["steps"] = o.Steps
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *MarketingSequenceView) UnmarshalJSON(data []byte) (err error) {
|
|
varMarketingSequenceView := _MarketingSequenceView{}
|
|
|
|
err = json.Unmarshal(data, &varMarketingSequenceView)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = MarketingSequenceView(varMarketingSequenceView)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "sequence")
|
|
delete(additionalProperties, "steps")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableMarketingSequenceView struct {
|
|
value *MarketingSequenceView
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableMarketingSequenceView) Get() *MarketingSequenceView {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableMarketingSequenceView) Set(val *MarketingSequenceView) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableMarketingSequenceView) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableMarketingSequenceView) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableMarketingSequenceView(val *MarketingSequenceView) *NullableMarketingSequenceView {
|
|
return &NullableMarketingSequenceView{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableMarketingSequenceView) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableMarketingSequenceView) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|