/
model_sms_forwarding_request.go
156 lines (127 loc) · 4.61 KB
/
model_sms_forwarding_request.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
/*
SORACOM API
SORACOM API v1
API version: VERSION_PLACEHOLDER
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package api
import (
"encoding/json"
)
// SmsForwardingRequest struct for SmsForwardingRequest
type SmsForwardingRequest struct {
// メッセージ本体のエンコーディングタイプ。デフォルトは `2` (`DCS_UCS2`)。 - `1`: GSM 7 ビット標準アルファベットを送信できます。漢字やキリル文字、アラビア文字などは送信できません。最大 160 文字 (最大 140 バイト)。 例: `{\"encodingType\":1, \"payload\":\"Test message.\"}` - `2`: UCS-2 で送信する。漢字やキリル文字、アラビア文字などを送信できます。最大 70 文字。 例: `{\"encodingType\":2, \"payload\":\"テストメッセージ\"}`
EncodingType *int32 `json:"encodingType,omitempty"`
Payload *string `json:"payload,omitempty"`
}
// NewSmsForwardingRequest instantiates a new SmsForwardingRequest 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 NewSmsForwardingRequest() *SmsForwardingRequest {
this := SmsForwardingRequest{}
var encodingType int32 = 2
this.EncodingType = &encodingType
return &this
}
// NewSmsForwardingRequestWithDefaults instantiates a new SmsForwardingRequest 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 NewSmsForwardingRequestWithDefaults() *SmsForwardingRequest {
this := SmsForwardingRequest{}
var encodingType int32 = 2
this.EncodingType = &encodingType
return &this
}
// GetEncodingType returns the EncodingType field value if set, zero value otherwise.
func (o *SmsForwardingRequest) GetEncodingType() int32 {
if o == nil || o.EncodingType == nil {
var ret int32
return ret
}
return *o.EncodingType
}
// GetEncodingTypeOk returns a tuple with the EncodingType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SmsForwardingRequest) GetEncodingTypeOk() (*int32, bool) {
if o == nil || o.EncodingType == nil {
return nil, false
}
return o.EncodingType, true
}
// HasEncodingType returns a boolean if a field has been set.
func (o *SmsForwardingRequest) HasEncodingType() bool {
if o != nil && o.EncodingType != nil {
return true
}
return false
}
// SetEncodingType gets a reference to the given int32 and assigns it to the EncodingType field.
func (o *SmsForwardingRequest) SetEncodingType(v int32) {
o.EncodingType = &v
}
// GetPayload returns the Payload field value if set, zero value otherwise.
func (o *SmsForwardingRequest) GetPayload() string {
if o == nil || o.Payload == nil {
var ret string
return ret
}
return *o.Payload
}
// GetPayloadOk returns a tuple with the Payload field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SmsForwardingRequest) GetPayloadOk() (*string, bool) {
if o == nil || o.Payload == nil {
return nil, false
}
return o.Payload, true
}
// HasPayload returns a boolean if a field has been set.
func (o *SmsForwardingRequest) HasPayload() bool {
if o != nil && o.Payload != nil {
return true
}
return false
}
// SetPayload gets a reference to the given string and assigns it to the Payload field.
func (o *SmsForwardingRequest) SetPayload(v string) {
o.Payload = &v
}
func (o SmsForwardingRequest) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.EncodingType != nil {
toSerialize["encodingType"] = o.EncodingType
}
if o.Payload != nil {
toSerialize["payload"] = o.Payload
}
return json.Marshal(toSerialize)
}
type NullableSmsForwardingRequest struct {
value *SmsForwardingRequest
isSet bool
}
func (v NullableSmsForwardingRequest) Get() *SmsForwardingRequest {
return v.value
}
func (v *NullableSmsForwardingRequest) Set(val *SmsForwardingRequest) {
v.value = val
v.isSet = true
}
func (v NullableSmsForwardingRequest) IsSet() bool {
return v.isSet
}
func (v *NullableSmsForwardingRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSmsForwardingRequest(val *SmsForwardingRequest) *NullableSmsForwardingRequest {
return &NullableSmsForwardingRequest{value: val, isSet: true}
}
func (v NullableSmsForwardingRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSmsForwardingRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}