-
Notifications
You must be signed in to change notification settings - Fork 14
/
sourceamazonsqsupdate.go
225 lines (207 loc) · 7.38 KB
/
sourceamazonsqsupdate.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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package shared
import (
"encoding/json"
"fmt"
"github.com/airbytehq/terraform-provider-airbyte/internal/sdk/pkg/utils"
)
// SourceAmazonSqsUpdateAWSRegion - AWS Region of the SQS Queue
type SourceAmazonSqsUpdateAWSRegion string
const (
SourceAmazonSqsUpdateAWSRegionAfSouth1 SourceAmazonSqsUpdateAWSRegion = "af-south-1"
SourceAmazonSqsUpdateAWSRegionApEast1 SourceAmazonSqsUpdateAWSRegion = "ap-east-1"
SourceAmazonSqsUpdateAWSRegionApNortheast1 SourceAmazonSqsUpdateAWSRegion = "ap-northeast-1"
SourceAmazonSqsUpdateAWSRegionApNortheast2 SourceAmazonSqsUpdateAWSRegion = "ap-northeast-2"
SourceAmazonSqsUpdateAWSRegionApNortheast3 SourceAmazonSqsUpdateAWSRegion = "ap-northeast-3"
SourceAmazonSqsUpdateAWSRegionApSouth1 SourceAmazonSqsUpdateAWSRegion = "ap-south-1"
SourceAmazonSqsUpdateAWSRegionApSouth2 SourceAmazonSqsUpdateAWSRegion = "ap-south-2"
SourceAmazonSqsUpdateAWSRegionApSoutheast1 SourceAmazonSqsUpdateAWSRegion = "ap-southeast-1"
SourceAmazonSqsUpdateAWSRegionApSoutheast2 SourceAmazonSqsUpdateAWSRegion = "ap-southeast-2"
SourceAmazonSqsUpdateAWSRegionApSoutheast3 SourceAmazonSqsUpdateAWSRegion = "ap-southeast-3"
SourceAmazonSqsUpdateAWSRegionApSoutheast4 SourceAmazonSqsUpdateAWSRegion = "ap-southeast-4"
SourceAmazonSqsUpdateAWSRegionCaCentral1 SourceAmazonSqsUpdateAWSRegion = "ca-central-1"
SourceAmazonSqsUpdateAWSRegionCaWest1 SourceAmazonSqsUpdateAWSRegion = "ca-west-1"
SourceAmazonSqsUpdateAWSRegionCnNorth1 SourceAmazonSqsUpdateAWSRegion = "cn-north-1"
SourceAmazonSqsUpdateAWSRegionCnNorthwest1 SourceAmazonSqsUpdateAWSRegion = "cn-northwest-1"
SourceAmazonSqsUpdateAWSRegionEuCentral1 SourceAmazonSqsUpdateAWSRegion = "eu-central-1"
SourceAmazonSqsUpdateAWSRegionEuCentral2 SourceAmazonSqsUpdateAWSRegion = "eu-central-2"
SourceAmazonSqsUpdateAWSRegionEuNorth1 SourceAmazonSqsUpdateAWSRegion = "eu-north-1"
SourceAmazonSqsUpdateAWSRegionEuSouth1 SourceAmazonSqsUpdateAWSRegion = "eu-south-1"
SourceAmazonSqsUpdateAWSRegionEuSouth2 SourceAmazonSqsUpdateAWSRegion = "eu-south-2"
SourceAmazonSqsUpdateAWSRegionEuWest1 SourceAmazonSqsUpdateAWSRegion = "eu-west-1"
SourceAmazonSqsUpdateAWSRegionEuWest2 SourceAmazonSqsUpdateAWSRegion = "eu-west-2"
SourceAmazonSqsUpdateAWSRegionEuWest3 SourceAmazonSqsUpdateAWSRegion = "eu-west-3"
SourceAmazonSqsUpdateAWSRegionIlCentral1 SourceAmazonSqsUpdateAWSRegion = "il-central-1"
SourceAmazonSqsUpdateAWSRegionMeCentral1 SourceAmazonSqsUpdateAWSRegion = "me-central-1"
SourceAmazonSqsUpdateAWSRegionMeSouth1 SourceAmazonSqsUpdateAWSRegion = "me-south-1"
SourceAmazonSqsUpdateAWSRegionSaEast1 SourceAmazonSqsUpdateAWSRegion = "sa-east-1"
SourceAmazonSqsUpdateAWSRegionUsEast1 SourceAmazonSqsUpdateAWSRegion = "us-east-1"
SourceAmazonSqsUpdateAWSRegionUsEast2 SourceAmazonSqsUpdateAWSRegion = "us-east-2"
SourceAmazonSqsUpdateAWSRegionUsGovEast1 SourceAmazonSqsUpdateAWSRegion = "us-gov-east-1"
SourceAmazonSqsUpdateAWSRegionUsGovWest1 SourceAmazonSqsUpdateAWSRegion = "us-gov-west-1"
SourceAmazonSqsUpdateAWSRegionUsWest1 SourceAmazonSqsUpdateAWSRegion = "us-west-1"
SourceAmazonSqsUpdateAWSRegionUsWest2 SourceAmazonSqsUpdateAWSRegion = "us-west-2"
)
func (e SourceAmazonSqsUpdateAWSRegion) ToPointer() *SourceAmazonSqsUpdateAWSRegion {
return &e
}
func (e *SourceAmazonSqsUpdateAWSRegion) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "af-south-1":
fallthrough
case "ap-east-1":
fallthrough
case "ap-northeast-1":
fallthrough
case "ap-northeast-2":
fallthrough
case "ap-northeast-3":
fallthrough
case "ap-south-1":
fallthrough
case "ap-south-2":
fallthrough
case "ap-southeast-1":
fallthrough
case "ap-southeast-2":
fallthrough
case "ap-southeast-3":
fallthrough
case "ap-southeast-4":
fallthrough
case "ca-central-1":
fallthrough
case "ca-west-1":
fallthrough
case "cn-north-1":
fallthrough
case "cn-northwest-1":
fallthrough
case "eu-central-1":
fallthrough
case "eu-central-2":
fallthrough
case "eu-north-1":
fallthrough
case "eu-south-1":
fallthrough
case "eu-south-2":
fallthrough
case "eu-west-1":
fallthrough
case "eu-west-2":
fallthrough
case "eu-west-3":
fallthrough
case "il-central-1":
fallthrough
case "me-central-1":
fallthrough
case "me-south-1":
fallthrough
case "sa-east-1":
fallthrough
case "us-east-1":
fallthrough
case "us-east-2":
fallthrough
case "us-gov-east-1":
fallthrough
case "us-gov-west-1":
fallthrough
case "us-west-1":
fallthrough
case "us-west-2":
*e = SourceAmazonSqsUpdateAWSRegion(v)
return nil
default:
return fmt.Errorf("invalid value for SourceAmazonSqsUpdateAWSRegion: %v", v)
}
}
type SourceAmazonSqsUpdate struct {
// The Access Key ID of the AWS IAM Role to use for pulling messages
AccessKey *string `json:"access_key,omitempty"`
// Comma separated list of Mesage Attribute names to return
AttributesToReturn *string `json:"attributes_to_return,omitempty"`
// If Enabled, messages will be deleted from the SQS Queue after being read. If Disabled, messages are left in the queue and can be read more than once. WARNING: Enabling this option can result in data loss in cases of failure, use with caution, see documentation for more detail.
DeleteMessages *bool `default:"false" json:"delete_messages"`
// Max amount of messages to get in one batch (10 max)
MaxBatchSize *int64 `json:"max_batch_size,omitempty"`
// Max amount of time in seconds to wait for messages in a single poll (20 max)
MaxWaitTime *int64 `json:"max_wait_time,omitempty"`
// URL of the SQS Queue
QueueURL string `json:"queue_url"`
// AWS Region of the SQS Queue
Region SourceAmazonSqsUpdateAWSRegion `json:"region"`
// The Secret Key of the AWS IAM Role to use for pulling messages
SecretKey *string `json:"secret_key,omitempty"`
// Modify the Visibility Timeout of the individual message from the Queue's default (seconds).
VisibilityTimeout *int64 `json:"visibility_timeout,omitempty"`
}
func (s SourceAmazonSqsUpdate) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(s, "", false)
}
func (s *SourceAmazonSqsUpdate) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil {
return err
}
return nil
}
func (o *SourceAmazonSqsUpdate) GetAccessKey() *string {
if o == nil {
return nil
}
return o.AccessKey
}
func (o *SourceAmazonSqsUpdate) GetAttributesToReturn() *string {
if o == nil {
return nil
}
return o.AttributesToReturn
}
func (o *SourceAmazonSqsUpdate) GetDeleteMessages() *bool {
if o == nil {
return nil
}
return o.DeleteMessages
}
func (o *SourceAmazonSqsUpdate) GetMaxBatchSize() *int64 {
if o == nil {
return nil
}
return o.MaxBatchSize
}
func (o *SourceAmazonSqsUpdate) GetMaxWaitTime() *int64 {
if o == nil {
return nil
}
return o.MaxWaitTime
}
func (o *SourceAmazonSqsUpdate) GetQueueURL() string {
if o == nil {
return ""
}
return o.QueueURL
}
func (o *SourceAmazonSqsUpdate) GetRegion() SourceAmazonSqsUpdateAWSRegion {
if o == nil {
return SourceAmazonSqsUpdateAWSRegion("")
}
return o.Region
}
func (o *SourceAmazonSqsUpdate) GetSecretKey() *string {
if o == nil {
return nil
}
return o.SecretKey
}
func (o *SourceAmazonSqsUpdate) GetVisibilityTimeout() *int64 {
if o == nil {
return nil
}
return o.VisibilityTimeout
}